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!


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.