Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a website that is currently hosted in a single DigitalOcean region. DO are great, but occasionally they have routing issues in a region and the website goes down.

The stack is very simple - a webserver, and a redis instance.

I would like to setup a failover in a different region, so if one region has issues, visitors will automatically be redirected to the failover, but I am not sure how to do this.

My initial thought was to use a load balancer, but since the load balancer would have to live in one of the regions, it defeats the point.

We use cloudflare for our dns, and they support a basic round robin system if you enter two IP addresses for the same domain, but I want all traffic to be directed to the primary node, unless it is unavailable.

What is the simplest way to set this up?

share|improve this question
    
And how can you determine for sure that the other site is really down? –  Nils Nov 20 '13 at 22:12
    
In the case of a routing issue, the IP is unreachable –  mrwooster Nov 20 '13 at 22:16
    
Unreachable from where? This might be a local network problem, not a remote one. –  Nils Nov 22 '13 at 20:13

1 Answer 1

up vote 1 down vote accepted

there are a number of ways to set up high availability. using haproxy is great, as is nginx upstream servers,.... also on ec2, elb works well for http and https

my personal favorite, dns round roubin to a dozen haproxies, which then distribute load to hundreds and/or thousands second tier servers. second tier should be caching, like varnish, in front of several hundred nginx nodes, that then have several thousand php-fpm pool members

at least thats how the big boys do it

share|improve this answer
    
Would it significantly affect the load speed of the site if our HA proxies and webservers were in different regions (e.g. servers in DO, haproxy on AWS)? The site is blazing fast at the moment. –  mrwooster Nov 20 '13 at 22:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.