Server in multiple locations

October 19, 2017 4.2k views
DigitalOcean

I’m looking for a new solution for speeding up my website response time.

I currently have a VPS hosted by a VPS company in the UK. But I have clients which use my software all the way in Hong Kong.
My UK response times are under a second - which is good. While the response times my Hong Kong clients are getting are about 6s, which really adds up and makes things slow.

I saw on digital ocean somewhere you can deploy to multiple locations.

Now what i’m thinking (not sure if possible), but I want to have a solution where I have one server I have to manage, but it actually responds from different locations.

so I manage one server, one database, one set of files etc. But when a user from Hong Kong requests data from my app, it is being requested from a server in/close to Hong Kong. My app has potential to have clients globally, so moving forward I would like to be able to deploy this system globally no matter where you are.

Is this possible with Digital Ocean, and can anyone provide any references I need to take a look at please?

4 Answers

You’d need to run your application code in both places, one at your current side and one on a second server in Hong Kong. If you’re moving from a one server setup, you’ll might have to make some changes to your application’s code so that you can configure both instances to speak to a common database server (not localhost).

Given that “speaking database” across the internet is generally a bad idea, you’ll want your database and your remote server to share a vpn. (I don’t think DO’s private network options span data centres)

Thank you, excellent solution!

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!