Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a website that I would like to add redundancy to. It's not a massive website, and will probably only receive a handful of database updates and/or files per day, however it's very important that the website is up at all times.

Since the server is running on an EC2 instance, I figured that I would just make use of the Elastic Load Balancing for the added benefit of the load balancer. Since the website doesn't receive a great deal of updates, I would imagine that running rsync every couple of minutes would be fine for file modifications, but what's the usual approach for keeping the databases in sync? Any issues with this setup?

share|improve this question

You can explore RDS for your MySQL database. RDS allows you to create a database in multiple AZ (availability zone). The failover is transparent and there is nothing you or your application will have to do if there is a failure of the primary database.

If you have to seup multi-master MySQL yourself it is a lot of hassle unless you are comfortable working with MySQL.

You are already on ELB so you are good with instance redundancy. Ensure both your instances are in multiple AZ's.

share|improve this answer
I've used RDS in the past, but am not currently for this project (I'm not opposed to it). I'm not currently using ELB, but plan on it. If I understand correctly, ELB does NOT synchronise the file structure, correct? I would still be required to synchronize files between servers? – Alec Sanger Aug 20 '12 at 13:39
ELB doesn't do anything to your EC2 instances. It simply spreads incoming connections between your instances. – Matt Houser Aug 20 '12 at 16:41

The ELB will only work for the website, it's not going to work for the database. Databases generally need to be configured with replication or some type of cluster. The easiest method for MySQL redundancy is called MySQL Replication, however there is some downtime if a server fails because you need to manually fail over to the slave database. If this is no ideal for you then you can use MySQL Replication with linux heartbeat this solution lets you create a script to perform the fail over which will execute in usually less than 60 seconds.

Other solutions are available but are more expensive and harder to configure. See this page for more details on the different MySQL replication / cluster options.

share|improve this answer

Your Answer


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.