I'd like to use Lighttpd in production for serving Django apps but i see that these days Nginx is more and more popular. Why is that? I'm aware that in the past Lighttpd had memory leaks but isn't this fixed now? They do have active developers that fix this kind of things don't they?
Is there any reason i should go with Nginx instead of Lighty? I know that nginx is a great server but is it really that good and better than lighty?
I'm a current nginx user and previous lighttpd user and I can only echo the stability issue. Furthermore nginx has active development and often sees a new version released every couple of weeks with new features or minor bug fixes. The configuration file is also quite clear and very powerful once you learn the nginx way of doing things.
Nginx can also be used as a load balancer (although haproxy is probably a little better at this if you don't need SSL).
Nginx can also be used as an SSL reverse-proxy, which is huge if you use SSL on multiple virtual hosts. This is probably the single biggest reason for nginx Netcraft numbers and nginx author said in a recent interview he thought this was the reason for a majority of deployments. It's certainly why I started using it... and then was shocked at the performance gains I was seeing :)
I recently did a side by side evaluation of lighttpd and nginx on the same server for a new project I am working on. Nginx performed slightly better than Lighttpd in my tests, and we have put nginx into production as a result. FWIW Netcraft reports about nginx is much more widely used than lighttpd on outward facing web servers: http://news.netcraft.com/
I am using both, nginx and lighttpd very successfully on a >500k hits/day website. Lighttpd (core) memory leaks must be a myth, I didnt experience any problems in all this time.
Nginx is great. Simple configuration, small memory and cpu footprint even with a lot of traffic, lightning fast and very stable.
In our case nginx is doing the reverse proxy caching, load balancing and url rewrites while lighttpd + spawncgi + php comes in handy as backend server doing the script execution.
I haven't tested the fastcgi interface of nginx very much yet, so I cannot say how good this works. php-fpm + nginx for static files could replace lighttpd
Found a VS page on the both, here is a little snip:
"Stability
As of August 2009, lighttpd still has unsolved memory leaks issues reported 3 years ago. One problem with Lighty is that it leaks memory like a sieve. I audited it for a little bit and I gave up, it's a mess. I'd steer clear of it, it will quickly ruin your day if you throw a lot of traffic at it."
Source: http://www.wikivs.com/wiki/Lighttpd_vs_nginx
Honestly, I haven't used nginx so I cannot speak from experience. I primarily used apache on my web server, but I have one at home which uses lighttpd. It only serves a small html only page and is only accessible by VPN, so it's more of an information portal when someone remote's in.
When I next get my head down and start experimenting with new and updated server side apps, I'll probably play with nginx. At the end of the day, it's your own choice, but depending if its going to be for a production environment, I would research both before committing to either.
I dont know much about lighttpd but reading from the below link, I learned that lighttpd runs as a single process with a single thread whereas nginx makes use of master and multiple worker processes.
http://www.wikivs.com/wiki/Lighttpd_vs_nginx
So this makes nginx better suited to take advantage of multiple core systems, nowadays almost all the devices ship with multiple cores.