Amazon S3 storage for user uploaded content. My Current Setup


Looking to share and for feedback on thoughts on this setup.

Our current consists of several web servers that are load balanced.

In the past I had a NFS share from a Windows box (NTFS as it support a bagillion folders) mounted as the blogs.dir and uploads folder.

From there I would take a nightly backup to amazon s3.

It worked pretty good for awhile until the NFS server crashed and pretty much reaked some havoc for hours until I could get a new solution up.

My current setup I have mounted the blogs.dir and the uploads to an Amazon S3 bucket using S3FS


1. The user request the file from our server

2. our server request the file from S3 then the file is store in the local S3 cache folder.

So initial requests are slower then the NFS solution but subsequent are on par.

Additionally we use varnish cache with a long cache life time for images and media types.

This saves on amazon requests and bandwidth.

Right now we a couple hundred thousand objects in amazon but the actual storage is only several gigabytes. But it saves on having to plan out for storage and worry about servers going down..

As long as the server doesn’t loose connection to S3 I guess.

Any thoughts on problems for this?