Question

Multi-Region High Availability

Right now I am setup in the NYC1 region. I am looking at how to mitigate some of the issues we have been experiencing in this region over the past month.

  1. What options are there to host a load balanced web server(s) in two regions (NYC and SFO for example)? Do we have to use an external LB for this?

  2. What option do we have to have a master-master type clustered database in two different regions?

What are others doing on DO to have high availability? I do not care as much about load balancing our services between two data centers, what we do want is ideally automatic failover from primary region to a backup/secondary region. So if we are experiencing issues with the NYC1 region we could manually or automatically failover to serving out of the SFO region.

Show comments

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.

I guess currently the best solution is:

  1. To have a DigitalOcean Load balancer in each region you need and have multiple droplets behind it
  2. Get a Cloudflare account and setup a DNS loadbalancer there and setup the Geolocation routing policy

This way the request will have this trace: Client -> Cloudflare DNS Loadbalancer -> DO Loadbalancer -> your droplet

I haven’t given up on DO for high availability across multiple sites, but it is definitely not as easy as we might hope. The lack of floating IPs across data centers and the fact that DO load balancers only work within a single data center are the big challenges that I have encountered. A standard IP takeover solution using something like keepalived isn’t going to work. What I am thinking about is an active-active set up with two published IP addresses that point to NGINX based load balancers in 2 different DO data centers. In most cases a browser will try to use the second IP in the first is not available. Since “most cases” isn’t really good enough, I was thinking about using something keepalived, or similar, to pull the failed IP address out of the DNS until the server is available again. This isn’t quick as even with a low TTL this could take minutes rather than seconds, but this removing the IP is a secondary measure to cover the situations where browsers don’t just roll to the second address on their own.

I realize this solution offer no balancing between load balancers and traffic will just randomly float between the two, but the goal is high availability across multiple data centers so I am no concerned if load is balanced between the balancers themselves.

I would be interested in any feedback on the viability of this approach.

If this seems feasible and people are interested, I’ll get it working and share any results with the DO community

Hi there @vhariable,

Sorry for the delay in getting a response to you! I have checked with our relevant teams about this to ensure the answer I give you is as correct as it can be.

Currently, both our load balancers and master databases are single-region. If you wanted to load balance across multiple Droplets in different regions you would, unfortunately, need to achieve this with your own LB.

With databases, we do support the ability to add read-only database nodes in different regions from the source database.

https://www.digitalocean.com/docs/databases/how-to/clusters/add-read-only-nodes/

Hope that helps! - Matt.