Providing high availability and failover using MySQL on EC2

I think you really want a multi-zone RDS setup which was recently added to AWS.

Read more here: http://aws.typepad.com/aws/2010/05/amazon-rds-multi-az-deployment.html

If you wouldn't ask about AWS, I'd suggest a setup including DRBD. This would make sure that both servers stay in sync all the time. But I'm almost 100% sure this isn't possible yet on AWS.

Generally, I'd be careful about snapshotting and all that - it's not a silver bullet! It takes a good while on AWS. The instance storage itself is a) not fast at all and b) not persistent! Even with EBS it's not really fast and you still need to stop the i/o for a consistent snapshot.


Cheap easy option - install mysql on different datacenters in EC2 yourself and setup master/master replication between them. Point your front end webservers in each datacenter at those replicated mysql servers. Setup automated DNS Failover between the front end webservers in each location if a content health check fails on your primary site - it will automatically redirect client traffic to the replicated site in the other data-center - unitl you fix the primary site and the health checks start passing again - then traffic will automatically fallback to the primary site. I do this all time - even between different vendors i.e. EC2 and Linode. It works great and client traffic failover happens in less than 1 minute. You can get automated DNS Failover from dnshat.com for cheap.