If you want to go along the nginx route, select the following options:
- nginx → gunicorn
- nginx → uWSGI
Running WSGI applications in Python on top of FASTCGI is usually not so good due to problems with the FASTCGI / WSGI adapters and how they are deployed to the servers.
Apache / mod_wsgi is still a more acceptable solution, and it will work better with less resources on startup like:
- nginx → Apache / mod_wsgi
Since bottlenecks will not be a web server, ultimately, it doesn’t matter what you choose until you set it up correctly, what most people will not do, because the site doesn’t get anyway, or they don’t have monitoring to know what they need to change.
In general, a choice that you think is easier to manage is the best thing you can do at startup.
For some background, what will be your real performance bottlenecks and the importance of monitoring, see:
All of the above, you mention Geroku. Right now there is really only one time with Heroku, and that should use gunicorn, and you won’t have to worry about nginx. This in itself, since guns alone is not a good option for serving static media assets that are almost forced to use Heroku to serve static certificates in other places.
source share