Handle user uploads in static content server (newbie question)

Leonardo Crespo leo at leocrespo.com
Wed Apr 14 05:48:45 MSD 2010

> Either I am understanding this incorrectly or this sounds like you have
> made things worse!
> If the user requests for the static content is going to enter via D,
> then what is the point? User download/access of static content should
> directly hit nginx running on S which accesses it's local storage.

Well in theory user uploads to D and all requests come from S, but if
the img reside on a different server, latency issues arise.
Truly static content like Logo's, Background etc are safely in S, but
user uploaded content is the problem.

> The reason why I'd push for the caching proxy option over shared storage
> is that in the setup you suggested, NFS is being configured for remote
> writes (during file upload). NFS writes should be avoided for the
> following reasons:

Not sure if I got the caching proxy option and how it could handle
user uploads...can you elaborate?

> * Security (why allow remote write access?)
> * NFS does not offer all POSIX guarantess which might become an issue
> (usually does during writes more than reads)
> * Unavailability of the remote system translates into an inability to
> accept new uploads

This is 100% true, it'll add another point of failure... not sure if
there are other options though.



On Tue, Apr 13, 2010 at 3:16 AM, Arvind Jayaprakash <work at anomalizer.net> wrote:
> On Apr 12, Leonardo Crespo wrote:
>>I just found out that I can do that on linode. Thanks for bringing this
>>idea up!
>>Here's a solution:
>>Using NFS, mount on the Dynamic server the Static server's directory
>>for static files (/images /user-uploads etc). Have nginx on Dynamic
>>with proxy_pass to Static for all static content. All uploads go to
>>the mounted drive on Dynamic (which points to Static).

> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx

More information about the nginx mailing list