Photo uploads and scalability

Valentin V. Bartenev ne at vbart.ru
Fri Aug 31 18:01:09 UTC 2012


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.

Reference: http://nginx.org/r/client_body_in_file_only

 wbr, Valentin V. Bartenev



More information about the nginx mailing list