Question

Running the same site across 2 servers in different loactions

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


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This is very interesting. Dont do it with CDN call it plan Z. Please try this, Have a list of IP address SAMPLE IS HERE https://db-ip.com/db/ then have a page that judges the ip and relocate to the appropriate server. I think the only down side that default page will be hit with every request. Or have two domains. the default one and the other side of the world domain. A user always hits the defaults, but when he/she gets redirected to the other server, all the url are for that server and not the default. the only downside you will have to re code that change. let me know what you decided. If i be lucky enough i think will try that with my application rather than relay on CDNs.

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.