Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am setting up a load balanced system on Amazon AWS. I will be uploading photos to my server and then reading the photos off the server from another device.

Let's say I have Server-A and Server-B running on my load balancer. If I upload a photo and hit Server-A, then I am assuming I won't be able to see the photo on Server-B.

What is the best way to handle this? Should I create Server-C to hold the photos and access Server-C from whichever server I hit with the load balancer? Then there is no load balancing on Server-C, so I would have to setup a backup server that copies the files from Server-C every X minutes?

Your thoughts are greatly appreciated.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

You will need a distributed filesystem like GlusterFS or NFS with DRBD running on server C and D (redundancy) to share the data directories with photos to Server A and B.

Instead, as jamieb suggested, its much much simpler if you upload it to S3 and retrieve from there. It will be cheaper (~$0.13/GB) than running 2 instances in HA mode and 99.99999% available.

There are SDK's for many languages to talk to S3 -- http://aws.amazon.com/code/

You can use tools like s3cmd and many more to talk to s3 for file upload and download

share|improve this answer

No, instance states have to be consistent (need to be identical) to properly work behind a load-balancer. The proper solution to this problem is to upload your photos directly to S3.

share|improve this answer
    
Or a clustered filesystem like Gluster. –  ceejayoz Aug 20 '12 at 1:06

Your Answer

 
discard

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.