By petrvacha
Hi, what is the best solution when I want 2 servers in 2 separated DCs. The main one in EU, second one in US. The second one should same like the main one or at least the DB should be copied from the main one every X minutes.
In case of problem with the main server/DC SOMETHING should automatically switch the trafic to the second one without any problems. Do I need a load balancer? What about Failover IP?
What would you suggest me?
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!
Hi @petrvacha
Currently DigitalOcean doesn’t provide services like Load Balancer or Floating IP to go between multiple data centers. They’re provided in the data center where they’re created.
If you want something with relatively fail-over, you should setup your database with something like Galera or in Master-Master. That way, you would have your database in multiple locations - in real-time sync. Then you should use a DNS with a low TTL (less than 5 minutes). You should then setup the secondary server to monitor the primary server. In case the secondary site cannot contact the primary site, then the secondary site would change the DNS so it became the primary site. When the original primary site comes online again, then it should be promoted to the primary site in DNS.
Doing high availability isn’t 1-2-3-simple and takes some planning, while trying to think of every scenario that could go wrong and mitigate against that.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.