Recommended Nginx + WSGI Configurations

Solution 1:

I prefer uwsgi because it's super configurable and has tons of options.

From the benchmarks I've done it has the best performance/memory usage. It's very flexible and can probably be configured precisely to suit your needs. I use uwsgi's emperor mode to host multiple apps. It will scan a given directory for config files and launch/manage all applications it finds config files for. You can remove the config to kill the app, touch it to restart, etc. It's probably the quickest and easiest way to go about multiple-app hosting. I have posted the details of my config on another topic: https://stackoverflow.com/questions/5906197/what-is-the-most-common-way-to-configure-static-files-in-debug-and-production-for/5906206#5906206.

Generally your application will be the bottleneck, not the wsgi server! But hey, if you want an even more performant WSGI server, you might want to look at meinheld or bjoern. Both are extremely lightweight and fast, built on fast event loops, picoev, and libev respectively, and both use the same high performance HTTP parser as node.js.