I am looking to find out from the community which you thi开发者_开发技巧nk is best?
Django running with the following.
Django, mod_wsgi and MySQL Django, mod_wsgi and Postgres Django, nginx and MySQL OR Django, nginx and Postgres
?
I use nginx because it's faster and I like how the configuration is set up. I have never run into any trouble using it so I can't see why one should rather use Apache + mod_wsgi.
Also, using fastcgi, you can restart your django site without restarting the whole nginx server, which I like.
And Postgres because:
If you're not tied to any legacy system and have the freedom to choose a database back-end, we recommend PostgreSQL, which achives a fine balance between cost, features, speed and stability. (The Definitive Guide to Django, p. 15)
Copied from: MySQL vs PostgreSQL? Which should I choose for my Django project?
EDIT:
I now think that uwsgi running behind a load balancer (varnish) is the best solution. nginx can then be used to serve static content.
See "Varnish and nginx, the best way (0.9.8.4)" @ http://projects.unbit.it/uwsgi/wiki/Example
You can use Emperor ( http://projects.unbit.it/uwsgi/wiki/Emperor) for managing apps in uwsgi. This will allow you to restart individual apps by simply touching their config files.
According to this benchmark Django+ uWSGI wins.
You can use nginx as a proxy and have apache run on localhost.
To start a single django project, you'd touch the wsgi file for that project and it will only reload that instance of django. You don't need to restart/reload apache
精彩评论