1

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?

Alec Sanger
  • 149
  • 1
  • 9

2 Answers2

1

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.

Chida
  • 2,491
  • 1
  • 17
  • 29
  • 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
0

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. http://dev.mysql.com/doc/refman/5.0/en/ha-overview.html

bwight
  • 791
  • 1
  • 6
  • 14