[Chicago] Facebook open sources FriendFeed's real-time Python web framework, Tornado
Garrett Smith
g at rre.tt
Tue Sep 15 07:23:34 CEST 2009
On Mon, Sep 14, 2009 at 8:52 PM, Kumar McMillan <kumar.mcmillan at gmail.com>wrote:
>
> Benchmarking Ruby in WEBRick is like benchmarking SimpleHTTPServer in
> Python. In other words, it's not really fair :) You should set up
> Phusion Passenger in Apache. It's just as easy as Django / mod_wsgi
>
> http://hackd.thrivesmarthq.com/how-to-setup-a-linux-server-for-ruby-on-rails-with-github-and-phusion-passenger
> (you can probably ignore the SSH config)
>
Yay! Ruby web apps *can* serve HTML faster than my friend's golden retriver
;) I owe Kumar a beer!
I added a couple new servers to the lot:
- Phusion (Ruby rack app + mod_passenger + Apache MPM)
- modwsgi
I should clarify a few things about the damned lies I'm spreading here. The
goal is not to benchmark frameworks, but servers. That's why it's a hello
world app. There are no templates, no databases, no sessions, no routing
layers -- just an HTTP server using a program over some interface to serve a
simple message to the client.
I dropped WEBrick, because it was pretty hilarious and web server stats
should be dry and boring. Obviously it's not intended for production use.
Neither is the Django wsgi server, but I left it in for comparison to the
other wsgi server implementations. I should probably drop it altogether
since it is probably misleading readers to conclude that Django is really
slow. Again, not a framework test, but I can appreciate how one might think
it was.
I still find it amazing that CherryPy, a pure Python server, holds its own
in this group. As a single module that you can include in your source tree,
it makes it super simple to build a performant dynamic web app.
I think these numbers (lies) should also dispel the myth that threaded
servers don't handle high levels of concurrency well. All of the servers
were threaded with the exception of Landshark (Erlang processes), Fapws
(libev events), and Tornado (epoll events).
100 Concurrent Requests
-----------------------
=============== ====== ===========
App Server RPS Time (ms)
=============== ====== ===========
Fapws 7174 14
Landshark 4479 22
PHP-5 4191 24
modwsgi 3651 27
Tomcat 6 3554 28
Tornado 2641 38
CherryPy WSGI 2102 48
Phusion 1873 54
Jetty 6 937 107
Django WSGI 785 129
=============== ====== ===========
1,000 Concurrent Requests
-------------------------
=============== ====== ===========
App Server RPS Time (ms)
=============== ====== ===========
Fapws 5359 187
Landshark 4477 224
modwsgi 3449 290
PHP 5 3062 345
Tomcat 6 3014 345
Tornado 2452 409
CherryPy WSGI 2126 470
Phusion 1585 636
Jetty 6 1095 949
Django WSGI 953 1057
=============== ====== ===========
10,000 Concurrent Requests
--------------------------
=============== ====== ===========
App Server RPS Time (ms)
=============== ====== ===========
Fapws 5213 1920
Landshark 4239 2361
Tomcat 6 2369 4752
Tornado 2265 4439
PHP 5 2239 4282
modwsgi 2115 4736
CherryPy WSGI 1731 5786
Phusion 1247 8082
Jetty 6 794 13210
Django WSGI 890 12330
=============== ====== ===========
20,000 Concurrent Requests
--------------------------
=============== ====== ===========
App Server RPS Time (ms)
=============== ====== ===========
Fapws 4788 4178
Landshark 2936 6823
Tornado 2214 9061
PHP 5 1728 11578
modwsgi 1374 14880
Tomcat 6 1362 15102
CherryPy WSGI 1294 15477
Phusion 961 20894
Django WSGI 790 27633
Jetty 6 616 32492
=============== ====== ===========
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20090915/f65eb6bb/attachment-0001.htm>
More information about the Chicago
mailing list