Shared file systems across multiple AWS EC2 instances

I have multiple Windows server instances running Amazon EC2 and would like to make them more error tolerant by running a duplicate instance with load balancers.

The problem is specific data, as an example it is not good to go from one web server to another web server if the content of the document root i.e. C: / htdocs / (Apache) or C: / Repositories (VisualSvn Server) are not identical.

Is there a way to share a volume between two or more instances?

My idea is a shared folder between EC2 istances:

enter image description here

I read that it is not possible to connect the same EBS volume to multiple instances. I also find that AWS is not good for NFS if I want to install them over NFS.

And finally, I also checked the S3 bucket installed on s3fs, but I found that this is not a good option either.

Can anyone help me in the right direction?

+3


source to share


1 answer


You are right, it is not possible to add an EBS volume to multiple instances at this time. To create shared storage for all instances, there are options such as NFS, installing S3 buckets, or using a cluster distributed file system such as GlusterFS.

However, in most cases, you can simplify the setup. Try to offload the static assets to a different (static) domain, or even host it in an S3 slave enabled website. Thus, you only need to take care of the dynamic application logic or scripts on your application servers.



Also try using some automatic deployment and / or configuration management tools. With these, you can, for example, easily create new machines or use them to deploy the latest code to your machines.

+2


source







All Articles