File Distribution on AWS Load Balancer

amazon-web-services

I have successfully install load balancing and auto scaling on AWS based on it's official tutorial : http://docs.aws.amazon.com/gettingstarted/latest/wah-linux/awsgsg-wah-linux.pdf

but, I have a question once it's up and running :

as we all know, if we want to have load balancing, of course we will have multiple EC2 instance. my question is, how to create, update or delete a file in an EC2 instance then automatically sync across all available EC2 instance under a load balancer?

thank you.

Best Answer

Historically the best practice has been to store common file content in S3, but that requires some effort to either mount S3 in user space or run some type of syncing script.

The easier approach is to use a NAS that is mounted on all of the servers so they can share a file system. In the past that would have required quite a bit of effort. However, Amazon Elastic File System (Amazon EFS) sounds like the service you are looking for.

You would simply need to mount the EFS volume on all of your EC2 instances and they can share a file system. The major downside is that EFS is currently in preview.