N

Nicholas Piël

nichol.as · Personal blog · on HN since 2009

Nicholas Piël writes about Python web servers, asynchronous networking, ZeroMQ and some computer vision work.

What HN saysHN links his benchmarks of Python web servers and async frameworks as a reference, one commenter calling the asynchronous one famous but dated, plus his ZeroMQ introduction.
28HN people shared it
24linked it in comments
8stories submitted
336story points
12 years agolast shared
2009people per year2026

Most-shared posts

  1. 1
    Benchmark of Python Web Servers
    21 people · 190 points · first shared 2010 · 17 comments on HN
  2. 2
    An introduction to ZeroMQ
    4 people · 91 points · first shared 2010 · 24 comments on HN
  3. 3
    Benchmark of Asynchronous Servers in Python
    4 people · 49 points · first shared 2009 · 12 comments on HN
  4. 4
    Person Recognition (with Python)
    1 people · 5 points · first shared 2010 · discussion on HN
  5. 5
    Person recognition by Pictorial and Contextual Cues
    1 people · 1 points · first shared 2010 · discussion on HN

What HN people wrote when they linked it

pilliq · 2012-09-22
I vote Gevent because of its speed, small resource footprint, and its simple synchronous-looking API, but be aware of its limitations. The greenlets (threads) spawned by gevent run in a single OS thread, so you won't be able to take full advantage of all the cores on your server with Gevent alone. Also, Greenlets run cooperatively meaning each one gains control of the CPU until it's done with its computation or hits an IO call. This is great for IO bound computation, not so much for CPU bound work. Even with these limitations, I still think it'll work well with in your application. Check out this comparison of Python servers: http://nichol.as/benchmark-of-python-web-servers
jethroalias97 · 2011-12-27
Here is an excellent resource which made me a convert to uwsgi: http://nichol.as/benchmark-of-python-web-servers. Setup is a bit more difficult, but if you are already using nginx it isn't so bad.
rudiger · 2011-02-18
Mr. Shaw giving an "extreme talk" on using ZeroMQ, Advanced Network Architectures With ZeroMQ, should be interesting. For those that don't know ZeroMQ and why it's so useful, here's a few links: http://nichol.as/zeromq-an-introduction http://www.infoq.com/news/2010/09/introduction-zero-mq http://www.igvita.com/2010/09/03/zeromq-modern-fast-networking-stack/ http://mongrel2.org/doc/tip/docs/manual/book.wiki#x1-640005.2 <== The Mongrel2 manual is probably the best concise introduction to ZeroMQ.
wladimir · 2010-12-08
It's still true -- I recommend looking at some comparisons. Worker-thread based http servers consistently have worse performance at handling a large number of connections, and the error rate for those (simply) using threads is also higher at large number of connections, For example, see this benchmark of Python web servers: http://nichol.as/benchmark-of-python-web-servers
joshbaptiste · 2014-06-06
This was a famous but now dated (2009) socket benchmark of frameworks that involved Diesel http://nichol.as/asynchronous-servers-in-python
ubershmekel · 2013-03-28
I'm no expert, but I think certain languages/frameworks are better suited to be behind certain servers when high concurrency is tested. E.g. from http://nichol.as/benchmark-of-python-web-servers it seems django would be better served behind gevent.
wyuenho · 2013-02-17
I'm actually quite perplexed as to why the blog author chose to use the WSGIRef which is known to be one of the slowest of the bunch according to this much more thorough benchmark: http://nichol.as/benchmark-of-python-web-servers Even more perplexed, why wasn't the payload and the WSGI apps sources published?
DrJosiah · 2012-06-17
There are at least 2 better http servers for Python, uWSGI and gEvent. Tornado is known to be slower: http://nichol.as/benchmark-of-python-web-servers . More specifically, uWSGI has been shown to respond at under 25ms with 15k+ concurrent connections. Throw uWSGI behind Nginx (with it's new websocket support), tune it a bit, and I wouldn't be surprised to see it "pass" and perhaps even be competitive.
allardschip · 2012-06-13
Can you elaborate on what you think is wrong with Gevent? It comes out pretty well in this shootout: http://nichol.as/benchmark-of-python-web-servers
alexatkeplar · 2012-04-23
Likewise +1 to Nginx + uwsgi. In the various performance benchmarks* uwsgi beats gunicorn, and uwsgi comes bundled with Nginx now, so there's really no reason to bother with setting up gunicorn any more. * http://www.peterbe.com/plog/fcgi-vs-gunicorn-vs-uwsgi http://nichol.as/benchmark-of-python-web-servers
weirdcat · 2012-03-01
Python/Bottle dismal performance here is in line with Nicholas Piël's fingings regarding WSGIRef server: Disqualified servers: (...) WSGIRef, I obtained a reply rate of 352 but it stopped reacting when we passed the 1900 RPS mark http://nichol.as/benchmark-of-python-web-servers
BonoboBoner · 2012-01-17
A good addition would be to use supervisord for running the uwsgi process at system startup. (as described here: http://brandonkonkle.com/blog/2010/sep/14/django-uwsgi-and-nginx/) For a good comparison on different WSGI servers (aka uwsgi vs gunicorn, etc): http://nichol.as/benchmark-of-python-web-servers
espeed · 2011-11-10
Yes, these are good as well... ZeroMQ: Modern & Fast Networking Stack, by Ilya Grigorik http://www.igvita.com/2010/09/03/zeromq-modern-fast-networking-stack/ ZeroMQ an Introduction, by Nicholas Piël http://nichol.as/zeromq-an-introduction Advanced Network Architectures with ZeroMQ, by Zed Shaw http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-advanced-netw…
antimora · 2011-08-22
Yes, it was primarily because of the performance. According to these benchmarks, unicorn totally choked: "... At the bottom we have Twisted and Gunicorn ..." http://nichol.as/benchmark-of-python-web-servers
lightcatcher · 2011-08-22
Its not a high traffic site, but I'm running a app that served average of 5 req/s with Mongrel2 + wsgid + MySQL + django and thats working pretty well. Also, the benchmark of Python web servers that gets linked everywhere (http://nichol.as/benchmark-of-python-web-servers) is getting old. I'm planning on doing a new benchmark, probably this coming weekend. As of now, I'm planning to test gunicorn, uWSGI, tornado, bjoern, eventlet, and gevent over HTTP, flup over FCGI, and uWSGI and wsgid over zeroMQ (behind Mongrel2). Thinking of it, I probably need to put all of the HTTP servers behind nginx for a more fair comparison. Am I forgetting any servers that people would like to see benchmarked?
Pewpewarrows · 2011-06-18
In 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
oewolf · 2011-03-14
Also, I found this introduction very useful: http://nichol.as/zeromq-an-introduction
codysoyland · 2011-02-23
It's too bad the author didn't include gevent in the post, as it seems to be the fastest way to do concurrency with python (see http://nichol.as/benchmark-of-python-web-servers). I'm surprised it was faster than the Go example. I wonder if a Cython-based handler would take it even further...
timf · 2010-12-01
Make sure to look at this more comprehensive review: http://nichol.as/benchmark-of-python-web-servers
kwellman · 2010-10-29
Here's a blog post from several months ago: http://nichol.as/benchmark-of-python-web-servers Gevent uses the http server built into libevent, which is written in C, so it's no surprise that it is fast.
dododo · 2010-08-05
or use greenlets http://pypi.python.org/pypi/greenlet at least in this benchmark, greenlets seem to do a very good job: http://nichol.as/benchmark-of-python-web-servers
stratospark · 2010-07-14
Gevent seems to be the fastest Python async server after Tornado: http://nichol.as/asynchronous-servers-in-python I'd be interested in seeing node.js benchmarked against these.
peterbe · 2010-06-07
This benchmark impressed us all that uWSGI was a lightning bolt but it's huge drawback was having to recompile Nginx (package usage hell) but that might soon be a thing of the past http://nichol.as/benchmark-of-python-web-servers

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close