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.

We're planning to move our Tomcat/MySQL app onto the Amazon cloud employing 2 EC2 instances (inst_1 & inst_2) running in different availability zones whereby inst_1 will contain the master RDS db and inst_2 the slave RDS db. If we employ elastic load balancing to balance traffic between the two instances, will traffic directed to inst_2 that includes insert/update/delete db transactions first update the master RDS db in inst_1 followed by a synchronous update of the slave in inst_2; thereby ensuring that the two RDS instances are always synchronized? Amazon's published info (whitepapers) suggests such, but doesn't explicitly state it. If not, how does one ensure that the two RDS instances remain synchronized? Additional note: We're planning to employ Amazon's Elastic Beanstalk. Thanks!

share|improve this question

1 Answer 1

Amazon RDS allows you to setup what is called Multi-AZ which means that you have a primary server in one AZ, and a backup in another AZ.

Your load-balanced EC2 application servers will always access one-and-only-one of these servers at any given time: usually the primary until it fails, at which point your application should automatically failover to the secondary server.

The only case where inst_1 could be accessing RDS primary while inst_2 is accessing RDS secondary would be during the actual failover transition period and that would only be because inst_1 hasn't been notified of the failure yet.

Operations such as insert, update, and delete function in such a way that both servers are updated simultaneously.

share|improve this answer

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.