[Twisted-web] Nginx vs Twisted Web
Christopher Lozinski
lozinski at freerecruiting.com
Mon Jul 1 21:08:02 MDT 2013
I am just choosing a web server, and I thought it would be good to
consult with this mailing list, since twisted web was on my short list.
I run a python moinmoin wiki, a static site, a zope 2 site, and a zope
3 site on a VPS.
The thing I care about most, is ease of use. None of my websites are
very high traffic. And I have way way too much complexity in my life to
manage.
The next thing I care about is reliability.
The thing I care least about is performance. Would that I had that
problem.
So Apache is the obvious first choice. But it is so complicated. They
threw in everything but the kitchen sink. I just do not like it, nor do
I want to spend the time wrestling with it to get it to do the needful.
And you have to restart apache everytime the config files change.
Nginx is the next obvious choice. "Apache is like Microsoft Word, it
has a million options but you only need six. Nginx does those six
things, and it does five of them 50 times faster than Apache."
Lightpd is an option, but perhaps it does not support wsgi. Maybe
lightpd2 does.
Cherokee showed up on my radar, it has a nice web admin GUI, but hard to
configure with moinmoin.
There are 20 or 30 other web servers, all of which I am ignoring. But
one that I have looked at closely is twisted web.
TwistedWeb is very interesting. When I read the Apache documentation,
my eyes glaze over. When I read the twisted documentation, my eyes
light up.
What an intelligent object model of networking. Twisted Web is also
closely related to Zope. At the very least, it is also using Zope
Component Architecture, which I like.
So here is my comparison of twisted web and nginx.
With Twisted web, first I wonder about configuration. Nginx is just
some configuration files. Perhaps easier then editing a python program.
Then I wonder about reliability. Nginx has a larger installed base,
more bug reports presumably more reliable. Plus it includes a process
monitor that
keeps things running. I think twisted web includes monitoring software,
but perhaps not as robust and mature.
The next nice thing about Nginx is that you can drop configuration files
and the server recognizes them, and does the right thing. No need to
reboot.
The twisted web python program I would have to restart.
Finally I worry about the performance. You can see a bunch of
interesting results for python servers here.
http://nichol.as/benchmark-of-python-web-servers
In general twisted web does not seem that fast, nor reliable. High
error rates. Bummer.
What is my conclusion? Well I think Twisted web is a brilliant object
model for networking software. But dedicated software for web serving,
like nginx performs way better
and is much more reliable.
So I think I am going to use Nginx in front of my moinmoin, zope 2, zope
3 and static servers. Is that the right decision? Pity, I really
like twisted web.
Anyhow I thought I would post this here, and see what people have to
say. Presumably I made some mistakes in this document. Please let me
know what they are.
More information about the Twisted-web
mailing list