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

Ok this may seem like kind of a newbie question, but here goes.

I'm using Amazon Web Services and created a Elastic Load Balancer for 2 instances that are identical EBS EC2 instances. We'll call these Server A and Server B. When a request for a file on the main load balancer, I'm assuming it balances the load between and pulls the file from either Server A or Server B. Now if I want to make a change to one of the site files on Server A. Do I then have to make the same change to Server B's file?

share|improve this question

Yes, the content on both servers needs to be the same for the sites served through the ELB, otherwise you'll end up with different content being delivered.

share|improve this answer
Is there any other options. Anyway to sync, that's easier than doing a new snapshot, re-deploying, and re-mapping instances to the load balancer? – nuecaster Jul 19 '11 at 0:36
Sure, you can load your code at instance boot using a deployment or configuration management system, or put your app assets on S3. – womble Jul 19 '11 at 0:39

You do need the same files on both. One way to achieve that is to use a cluster file system, such as gluster - you can mount the file system, and it will automatically replicate changes between the servers (or if you grow to more servers, you can setup a distributed file system so that you don't end up with too many copies of the same file).

I believe that another approach is possible, but it would largely negate the point of a load balancer. In some reverse proxies it should be possible to setup a redirect if a file doesn't exist, where the redirect points at another server. So, essentially, check for file - serve if exists, otherwise, use the other server. Frankly, I see no point to this approach, in this scenario.

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.