How to configure nginx and uWSGI to serve Django projects
11–20 of 24 posts
Re: How to configure nginx and uWSGI to serve Django projects
#12Wasnt the point of a web application framework that you could put it anywhere and type run and have it done, instead of having to think of process- or event- or thread- based serving and static files? Thats not python. Even php is simpler/better in this regard.
Its not so difficult to run an instance of a threaded/process/eventlet server and let your app do the work.
Re: How to configure nginx and uWSGI to serve Django projects
#13Why the need for these "how to configure" this and that when it can be as simple as runthisnowdamnit.py using gunicorn or cherrypy? Or you know, some other server which doesnt require learning and blogging about its configuration and various options it can be set up? Sure that might come in handy, when or rather if you ever face millions of users/load problems. Wasnt the point of a web application framework that you…
Re: How to configure nginx and uWSGI to serve Django projects
#14nginx, Varnish, and uWSGI are oh so awesome together. My app (I run a Pyramid based application) is lightning fast, and very easy to configure (much easier than mod_wsgi).
Re: How to configure nginx and uWSGI to serve Django projects
#15Why the need for these "how to configure" this and that when it can be as simple as runthisnowdamnit.py using gunicorn or cherrypy? Or you know, some other server which doesnt require learning and blogging about its configuration and various options it can be set up? Sure that might come in handy, when or rather if you ever face millions of users/load problems. Wasnt the point of a web application framework that you…
Well i think the gist is that serving files and running applications have different resource requirements. Therefore it is common to have a proxy serve statics and proxy in addition to an application server running python. The advantage with uwsgi as i understand it is that the proxy protocol is faster than http.
Re: How to configure nginx and uWSGI to serve Django projects
#16nginx, Varnish, and uWSGI are oh so awesome together. My app (I run a Pyramid based application) is lightning fast, and very easy to configure (much easier than mod_wsgi).
Why nginx AND varnish? I thought varnish could proxy as well? Or maybe could you explain your setup.
Re: How to configure nginx and uWSGI to serve Django projects
#17Why the need for these "how to configure" this and that when it can be as simple as runthisnowdamnit.py using gunicorn or cherrypy? Or you know, some other server which doesnt require learning and blogging about its configuration and various options it can be set up? Sure that might come in handy, when or rather if you ever face millions of users/load problems. Wasnt the point of a web application framework that you…
Re: How to configure nginx and uWSGI to serve Django projects
#18Earlier quoted context omitted.
Why nginx AND varnish? I thought varnish could proxy as well? Or maybe could you explain your setup.
Varnish is just a proxy, or webcache, as I believe they like to call it. Nginx is needed because Varnish won't talk directly to the uwsgi processes, Varnish only understands http. The data that Varnish need to cache has to be supplied by a webserver somewhere and nginx is pretty nice and easily configurable. So I would assume that the idea is to use nginx as the webserver, not the cache/proxy.
Re: How to configure nginx and uWSGI to serve Django projects
#19Re: How to configure nginx and uWSGI to serve Django projects
#20Earlier quoted context omitted.
Varnish is just a proxy, or webcache, as I believe they like to call it. Nginx is needed because Varnish won't talk directly to the uwsgi processes, Varnish only understands http. The data that Varnish need to cache has to be supplied by a webserver somewhere and nginx is pretty nice and easily configurable. So I would assume that the idea is to use nginx as the webserver, not the cache/proxy.
you can directly link uWSGI with varnish using http protocol instead of the uwsgi one: http://projects.unbit.it/uwsgi/wiki/Example#varnish