

Benchmarking node, tornado and django for concurrency - Swizec
http://swizec.com/blog/benchmarking-node-tornado-and-django-for-concurrency/swizec/1616

======
asolove
<snark>I was just asking myself: "Hmm, do I want an environment for writing
network programs, an asynchronous web server, or a web application framework?"
But now I can decide based on a statistically-naive comparison of their
concurrency performance!</snark>

Seriously, though, solve your problems by seriously looking at what the
available tools provide, rather than benchmark numbers or "new hotness" stuff
you see on HN. Each of these is a fantastic tool for an appropriate problem,
but I don't think there is any problem where any two of these would be in
competition.

------
18pfsmt
I have the same question. This benchmark seem to be comparing apples and
oranges. I'm just moving from sysops to dev, so I hope someone can explain,
but here is how I see the three items being compared:

Django- a python web framework Node.js- a javascript server framework Tornado-
a non-blocking webserver

~~~
Swizec
The thing I was going for is that all three of these get used to handle
concurrent requests so it pays to know how they compare in this task. All of
them act as a server, often behind nginx or something, all of them take a
request and pump out a response.

They're not _that_ different.

~~~
lamby
> All of them act as a server

Django is not a server. How did you even make it serve HTTP requests for your
benchmark? (Please don't say "runserver")

~~~
Swizec
./manage.py runfcgi

The django docs recommended way of running it behind nginx.

~~~
mrud
So you compared nginx with django via fastcgi to node and tornado?

JFTR, this benchmarks feels strange. Please describe next time how you setup
django/tested it and describe the whole software stack. This is important
while comparing and understanding benchmarks. You never provided details about
your django setup.

------
netnichols
Am I missing something? Django isn't a server, it's a framework. Why was this
included in the "benchmark"?

~~~
Swizec
Because node isn't a server either. It's a framework for handling requests.

Also django has all the batteries needed to run as a server and it's
interesting to note how much performance is affected when there are too many
batteries included.

~~~
simonw
Did you run your benchmark against Django's ./manage.py runserver development
server? If so, it's no wonder you got bad results: that server is single
threaded and the documentation explicitly warns against ever running it in
production.

~~~
anthonyb
Not just that, but he didn't appear to switch DEBUG off:

[https://github.com/Swizec/random-
coding/blob/master/serverbe...](https://github.com/Swizec/random-
coding/blob/master/serverbench/django_bench/settings.py)

