uploads & nginx/mongrel with multiple machine deployment

I am in the process of migrating an app that currently resides on a
single hardware server (running pound, nginx as an asset host,
memcached, mongrel and mysql) to a group of xen virtual machines: an
appserver running the mongrels, a webserver running nginx (which will be
handling the proxying now as well) and memcached, and a database server
running mysql.

One of the apps I am moving handles file uploads and I am not clear on
what impact splitting the web and app roles across servers will have.

I realize I will need to devise some method for making the uploaded file
accessible to the web server after post-processing (since I want it
serving all static content) but I am a bit confused about the actual
upload submission.

To the point, I am not clear if nginx is actually receives the uploaded
file and then hands it to the rails backend or if the rails backend
handles the file upload all by itself... If that is the case would I
need to also devise a way to make the file data accessible to the rails
backend since it would seemingly reside on a different server?

I think I am thinking myself in knots. :slight_smile: Could someone clarify this
for me?

nginx does buffer the whole request body before sending it to the
backends. For the file distribution maybe attachment_fu and S3? or
NFS ...