Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are there any updated benchmarks/feature comparisons between nginx/uWSGI vs. nginx/gunicorn out there?


There are benchmarks around [1], though I consider them valuable only for the entertainment value.

The great thing about uWSGI/Nginx over Gunicorn/Nginx is that Nginx speaks the uwsi protocol natively[2], whereas with Gunicorn Nginx acts as a proxy.

Also, in my experience (2 years with gunicorn, 1 with uwsgi in prod), uwsgi is more stable, uses less memory, has better management and configuration tools and even lets you run multiple Python apps under the same intepreter (multitenancy) [3].

[1] http://www.peterbe.com/plog/fcgi-vs-gunicorn-vs-uwsgi

[2] http://wiki.nginx.org/HttpUwsgiModule

[3] http://projects.unbit.it/uwsgi/wiki/TipsAndTricks

(Edit: formatting)


The web server doesn't matter. Your app is what will be slow.


So you can serve a production site using Python's wsgiref and SimpleHTTPServer?

Servers do matter - memory usage, throughput, error rate, concurrent request handling etc. If the options are to use a faster server, or hunt down your code for bottlenecks, the choice is clear. Even if I modify my code to be faster, a faster server doesn't hurt.

This "benchmarks are useless" meme is overdone. "Hello World" benchmarks don't matter, but if a server is significantly faster on my real world application, why would that benchmark be meaningless for me?


Personally, I would like to know if this setup is available using gunicorn.


It would be very similar, you'd just need supervisord or something similar to run gunicorn for you. There is a pretty complete example of deploying gunicorn + nginx in the docs: http://gunicorn.org/deploy.html


I'm actually setting up a new ec2 instance tonight as my current one is set to expire.

I currently run DUNG (nginx/gunicorn), perhaps I will run nginx/uWSGI first and compare performance. I will ping you if I get around to it.


Your wsgi server is almost never the bottleneck - see this talk by Graham Dumpleton at Pycon - http://youtu.be/Bt2HStzaBzE




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: