Search code examples
apachelighttpd

Lighttpd instead of Apache


No doubt Apache is the most popular web server to use with PHP and definately it works great. However I'm curious to know what are advantages (if any) to use Lighttpd instead of Apache. Thanks.


Solution

  • Theoretically, because of a smaller footprint Lighttpd should allow more users to visit site at the same time using exactly the same resources as Apache would.

    As example (just to prove the point, this is not the real numbers) On the same hardware Apache would allow 100 users to view your page at the same time, while Lighttpd would allow 150.

    Lighttpd also has a different scheme of mapping processes, so it would serve better when the number of visitors is spiking.

    Every server, and webpage is written differently, so it is very hard to predict how each of these servers would perform on : a) your specific hardware, it is good to contact your hosting company and ask what they advice to use on their hardware b) your software, Plesk of CPanel would perform differently than clean Apache of Lighttpd installation c) Your site content, site with a lot of pictures has different fingerprint than server which serves video. d) Your processor cores