5 ms·
I'm not clear on the advantages of using nginx+Gunicorn over nginx+proxy-to-Apache/mod_wsgi
by simonw 15y ago
I'm not clear on the advantages of using nginx+Gunicorn over nginx+proxy-to-Apache/mod_wsgi
- Pewpewarrows 15y agoIn reality, not that much. There's a pretty detailed benchmark breakdown here [1]. From my experience, the point where you see the different methods start to diverge is past the point you're going to be able to handle on a single box with a real-world application anyway. I find that gunicorn is slightly easier to setup (not requiring Apache to be installed, etc), so I've stuck with it. To each their own! [1] http://nichol.as/benchmark-of-python-web-servers http://nichol.as/benchmark-of-python-web-servers
- Stiffy 15y agoIt's hipper. More trendy. Lets you write blog articles that make it sound like you're cutting-edge.
- senko 15y agoA lot of people use apache+nginx+mod_wsgi combination, but it seems to me that's more complicated than having just one web server. Apache might be more versatile, but if used with wsgi, and if you use nginx as well anyways, I don't see the need for all the bells and whistles apache has?
- Stiffy 15y agoApache is also very well-tested and extremely reliable. For some people and organizations, that's a very important factor.
- 18pfsmt 15y agoI happen to find this post very helpful as a student of the craft, and your comments seem to be defensive of a traditional approach because you don't care to examine the reasons for the choices you've made. The pros and cons of either choice would be more helpful than demonstrating animosity toward an approach you've chosen to dismiss. It's great that you have a setup you know and are comfortable with, but for those of us that would like to explore all options these posts are very helpful. It sucks you have to dismiss this as a ploy to be "hip".
- ryanhuff 15y agoI didnt find the parent defensive. I appears to be more of an observation. Perhaps it was edited after the fact?
- Stiffy 15y agoIt wasn't edited. I'm not sure why 18pfsmt is overly sensitive. Maybe he subconsciously feels that his new techniques are inferior to proven approaches, and exhibits this through outrage?
- slig 15y agoLess packages to keep updated, thus less maintenance.
- Stiffy 15y agoThe number of packages involved is a very poor measure of the effort needed to maintain a system. Apache and more established technologies have had much more testing and are far more mature. Their releases are often much more infrequent, merely because most of the problems have already been worked out. Newer technologies, on the other hand, aren't in such a position. Although your solution may involve a smaller number of packages, having to perform weekly or even monthly updates due to the immaturity of the software is much riskier and disruptive than having to upgrade Apache and a few of its modules once or twice a year.
- slig 15y agoExcellent points. Thanks!
- timc3 15y agoIts not really hip and trendy, its the standard way to go now days. The advantages to me are, Nginx is much lighter on resources for any given number of concurrent connections. I can keep those connections open if I really need to, and I have found it flexible enough for almost all scenarios (hosting SVN is the one thing I can think of that it doesn't do, but SVN's days are numbered for my usage anyway and http1.1 proxying backends). Nginx's syntax for its configuration tends to be easy to read, the community is helpful. Its also well tested and hosting a decent percentage of websites. I question the need to use Apache2 these days and anyone who blindly recommends it without knowing the alternatives as they tend to be uninformed about modern hosting environments.
- simonw 15y agoThat's why I run Apache+mod_wsgi behind an nginx proxy (and have nginx serve up static files etc directly).
- frankwiles 15y agoSimon, slightly better memory usage in most cases. More so if you don't end up stripping out all of the Apache modules you aren't using. But it's such a small differences it usually isn't worth changing from what you know and are comfortable with.