Running the same site across 2 servers in different loactions

September 26, 2017 129 views
Networking Apache Configuration Management Deployment VPN Ubuntu 16.04

Hi All,

I am launching a new site and we are expecting a lot of traffic across the US as its a new version of our current one. We currently use a single server in New York for web and DB.

However I would like to have 2, now ideally I would like to have one the other side of the USA which digital ocean provides. But I am not sure how I would be able to distribute traffic between two web servers with the same domain name.

I am happy enough with ensuring that both are always in sync I have a pretty good plan for that. But making sure that someone close to one server gets a response from the nearest one not the other one

Is this at all possible, if it is how can I go about it. I currently have the single server as Ubuntu with VespaCP on top to run the site

Thanks

1 Answer

As far as I know you can use CDN's to serve static content from a source that is more local but the main application or website has to be in a single place. It may be possible and I would like to hear of it but I can imagine the complexities and really you will not notice such a big difference between coasts of the USA if you get caching and various things set right.

While it is easy to ask where the request is being asked of the server you determine this in your own code already on your server so it already made the journey one way. There must be technology with DNS that allows server IP's to be given in response depending on location but it is really not typical in my experience.

Have another answer? Share your knowledge.