This is to seek suggestions and ideas from members here on implementing fail over strategy for our company website. We can't really afford to have downtime on the site which is hosted on VPS of DreamHost (DH). DH VPS though good gets down once in a while. First thought that comes to anybodys mind is to move to another webhost but in our experience most of the webhosts though claim 99.9% uptime guarantee, no one is able to really provide that and dedicated servers would be an overkill for us - at least as of now. So we think of implementing a DNS failover strategy. Here is what we plan to do. Mirror our files on another host (say hostgator) but keep mysql database on Dreamhost (In our experience mysql servers are really v stable on DH) Use a DNS service like zoneedit.com which will keep polling our main server(Dreamhost) for the uptime. In case, it is down it will point our A Name to hostgator (We will keep TTL to 2 mins) So files will be served from hostgator's server which will in turn point to mysql database on dreamhost. In the mean time zoneedit will keep on polling Dreamhost , as soon as it is up it will point A Name back to Dreamhost Does this makes sense? Any ideas you would want to add?
You're assuming that other DNS servers will pay attention to your 2 minutes TTL which is very unlikely. Using DNS as a failover method is unlikely to be successful; you need a more robust solution. I also wouldn't be too happy about the speed of your site if your'e connecting to MySQL over the internet. Connecting over an internal network is fine, but over multiple switches and routers on the internet isn't going to give great performance. 99.9% uptime isn't unusual but I suppose that depends on the host and the OS they are using. We've had 100% network uptime for over 5 years now and I don't know a single VPS that we host whose uptime is less than...let me check....99.979% over 12 months (you need a decent time period to get a good idea). Clustering is simple depending upon your host and what facilities they have set-up. We operate Windows Hyper-V and clustering is simple with this software over 2, 3 or more web servers with redundant SANs providing guaranteed 100% uptime. You'd be better sticking with a single host and trying to find a solution with them. If they haven't got software that is easy to cluster they might be able to set-up some sort of routing policy for you where if they detect your primary VPS is down it re-routes to your failover VPS. At least that way people will continue to connect over the same external IP. The other issue is keeping both sites synchronised, but it's not critical unless your site makes lots of changes. It would also be nice is they could cluster MySQL for you or have it available because MySQL will alway be your single point of failure - and the most important one if your site is DB driven. If MySQL goes down all your various VPSs will be no use to you. We don't have a MySQL cluster but we do have a MS SQL 2008 DB cluster with 100% uptime guaranteed - I'm sure the same could be done for MySQL. Clustered VPSs, Clustered MySQL - 99.9% uptime absolutely guaranteed with an SLA would be simple, and 99.99% uptime more than possible - and not too expensive to implement with virtualization software if you can find a host who has the necessary infrastructure.