Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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