How to upgrade multiple load balanced EC2 instances?

So, I played with Amazon Cloud (AWS), and I'm trying to figure out how to get files to the entire server if they are load balanced.

At first it seemed to me that I could associate 3 different instances with a load balancer, and then each instance uses the same volume. That way, all I have to do is update one volume using a recent site build, and each instance will then gain access to it. However, I read that you cannot exchange volumes between instances.

So what is the solution? Should I have all three instances with the same data and a fourth that I could update? The fourth then replicates the data for the other three.

Just trying to figure out how to update production files, and have all the servers that handle the load to extract the latest code base.

+6
amazon-web-services amazon-ec2 load-balancing
source share
1 answer

Yes, all servers must have the same content. You can do this by creating an NFS share or similar, and installing it at one point on each server. But, apparently, a suitable solution is to create snapshots of the EBS volume, and then mount them on each instance. See http://linuxforlovers.wordpress.com/2009/04/11/sharing-amazon-elastic-block-store-among-multiple-instances/ for more details. Each time you want to commit your changes, you commit only the EBS volume.

+3
source share

All Articles