4

I am currently running a high-traffic python/django website using Apache and mod_wsgi. I'm hoping that there's a faster webserver configuration out there, and I've heard a fair number of recommendations for lighttpd and fastcgi. Is this setup faster than apache+mod_wsgi for serving dynamic django pages (I'm already convinced that lighttpd can server static files better)? The benchmarks online are either poorly conducted or inconclusive so I'm looking for some personal anecdotes. What architectural benefits does lighttpd + fastcgi provide? I understand that lighttpd uses epoll, and that a fastcgi process will be multithreaded. Also, having two separate processes, one for lighttpd and one for the python interpreter, will be largely beneficial.

I am aware of tornado and its ability to handle thousands of file descriptors with much fewer threads using epoll and callbacks. However, I'd prefer to stick with django for now.

Thanks,

Ken

4

Web server overhead is never the main cost of a dynamic request - database queries and complex templates use much more resources and every half decent web server can serve hundreds of requests per second, even manage.py runserver in django with an empty template.

Just pick whatever server you know best. I've successfully deployed a site on apache/mod_wsgi, see this answer for details.

Also, "high traffic" is pretty subjective. A number would be more useful.

0

You can look at Magnum Py (http://code.google.com/p/magnum-py/) which is an epoll based web server that can communicate to Django via the WSGI interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.