4

I have a couple of windows server instances running on Amazon EC2 and would like to make them a bit more fault tolerant by running a duplicate instance with load balancers.

The problem is the specific data, as an example it does no good to fail over from one web server to another web server if the contents 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 across two or more instances?

My idea is share folder between EC2 istances:

enter image description here

I read it's not possible to attach the same EBS volume to multiple instances. I believe also AWS is not NFS friendly either in case I want to mount them across NFS.

And finally, I've also checked S3 bucket mounted with s3fs but I found out it's not a good option too.

Can anyone help point me in the right direction?

Thomas
  • 43,637
  • 12
  • 109
  • 140
Simone Nigro
  • 4,717
  • 2
  • 37
  • 72
  • Possible duplicate of [Shared storage between multiple AWS EC2 instances](http://stackoverflow.com/questions/17415620/shared-storage-between-multiple-aws-ec2-instances) – Thilo Oct 06 '15 at 12:24

1 Answers1

3

You are right, at the moment it is not possible to add an EBS volume to multiple instances. To create a common storage for all instances, there are options like NFS, mounting S3 buckets or using a distributed cluster filesystem like GlusterFS.

However in most cases you can simplify your setup. Try to offload static assets to another (static) domain or even host it on an website-enabled S3 bucket. This way you only have to care about the dynamic application logic or scripts on your app servers.

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

j0nes
  • 8,041
  • 3
  • 37
  • 40
  • What do you think of my idea to create a shared folder on an instance? – Simone Nigro Nov 22 '14 at 16:24
  • 2
    This depends largely on your use case and your application. I would suggest to start with the most simple setup (for example NFS), create a benchmark test case and measure how your applications performs (in terms of latency, throughput, response time, server load etc). You can compare other advanced setups using this benchmark case later, too. – j0nes Nov 22 '14 at 21:37