On 3/1/2015 7:13 AM, Benj wrote:
Just a little questions guys: when a user upload a file to server, and that file is a litte big and takes 3 seconds to be uploaded... what's the proper way, if possible, not to block the entire system for these 3 seconds so the server can serve other users while the upload is taking place.
Let a web server handle the actual upload. Nginx is really good at this, it can easily handle thousands of concurrent connections. Once all the data is actually transferred to the server, only then does the request get passed on to your Django app. A worker is not needed until that point. This is the default behavior if you use a Nginx / Gunicorn (or uWSGI) / Django stack.

You can also use the Nginx Upload Module, and your Django app will never need to receive the actual data at all. Nginx will handle the upload, put it in a location of your choosing, then hand the path on the server off to your app. http://wiki.nginx.org/HttpUploadModule

_Nik

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54F48FE7.2030103%40consbio.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to