For development, I use a local LAMP stack, for production I'm using MediaTemple's Django Container (which I'm loving BTW). MT's container uses lighthttpd. Honestly I've never had any other experience with it. I've always used Apache. I've been doing some reading:
Here's are questions:
Apache is a very featureful and extendable webserver. In most instances, you would want to use Apache. Lighttpd is smaller and quicker, because it doesn't have all the features that Apache does. You would want to use it on a very large scale website.
lighttpd (pronounced "lighty") is an open-source web server optimized for speed-critical environments while remaining standards-compliant, secure and flexible.
Lighttpd is an IPv4 and IPv6 compatible Web server that understands HTTP/1.0 and 1.1, HTTPS (using OpenSSL) CGI/1.1, native FastCGI, and HTTP authentication.
The benefit of both: Apache is more powerful and extensible (useless if you don't need that power, but anyway...) and lighttpd is faster at static content. The idea is of splitting your site into static content (css, js, images, etc) and dynamic code that flows through Apache.
I'm not saying you can't do a lot with lighttpd on its own. You can and people do.
If you're using lighttpd exclusively on your production server, I would seriously consider mirroring that on your development and staging servers so you know exactly what to expect before you deploy.
For purely static web pages (.gif, .css, etc.) with n http requests from distinct ip addresses: 1. Apache: Runs n processes (with mod_perl, mod_php in memory) 2. lighttpd: Runs 1 process and 1 threads (You can assign m threads before launching it)
For purely dynamic web pages (.php, .pl) with n http requests from distinct ip addresses: 1. Apache: Runs n processes (with mod_perl, mod_php in memory) 2. lighttpd: Runs 1 lighttpd process thanks to async I/O, and runs m fast-cgi processes for each script language.
Lighttpd consumes much less memory. YouTube used to be a big user of lighttpd until it was acquired by Google. Go to its homepage for more info.
P.S. At my previous company, we used both with a load balancer to distribute the http traffic according to its url suffixes. Why not fully lighttpd? For legacy reasons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With