Photo uploads and scalability

"Paweł Marzec -" pawel at
Sat Sep 1 07:06:36 UTC 2012

upload_module removes uploaded files from body and replaces them with  
paths to temporary files where there are stored at end.

So your backend don't have to parse body again to extract files from  
it. Parsing costs memory & cpu.

If you upload photos, they will land on disk. Your backend can analyze  
them briefly, make first thumb to be shown back to user and ask/ 
schedule other workers to make scalling/rotating and any image  
processing you want to be done later in real background.

I'm happy user of upload_module ;-)
in tandem with uploadprogress_module

It is easy to setup, very.

imho: it's worthwhile

Paweł Marzec

Wiadomość napisana w dniu 2012-09-01, o godz. 07:17, przez Ian Evans:

> On 31/08/2012 2:01 PM, Valentin V. Bartenev wrote:
>> On Friday 31 August 2012 21:40:16 Ian Evans wrote:
>> [...]
>>>  From a programming end I already know I'll queue any post- 
>>> processing
>>> and inform the reader when it's done so that process can be  
>>> handled by
>>> my local server or cloud instances etc.
>> TIP: You can avoid passing files over an upstream connection.
>> Example:
>>   location = /upload {
>>       proxy_pass http://backend;
>>       client_body_in_file_only  clean;
>>       proxy_set_body $request_body_file;
>>   }
>> Your application should "mv" uploaded file somewhere, then register  
>> a task
>> for further background processing, and return a response.
> As photos are several megabytes, should I be looking into nginx's  
> upload module?
> _______________________________________________
> nginx mailing list
> nginx at

More information about the nginx mailing list