Lighttpd (pronounced as lighty) is an open source web server and is a rival to the world’s leading web server-Apache! Apache played a key role in the initial growth of World Wide Web. For decades, Apache has been ruling the roost when it comes to webservers. It is undoubtedly the most popular web server with millions of users around the globe.
Lighttpd is very secure, fast, compliant and flexible. It is free and distributed under BSD license. The web server is optimized for high performing environments and designed to be massively scalable. It has very low memory footprint compared to other web servers and has a wide set of advanced features, which include FastCGI, CGI, Auth, Output Compression and many more. The advanced features make Lightpd the ideal webserver software for servers that encounter loading issues. Lighttpd has been developed by a German MySQL developer Jan Kneschke. A few heavy duty sites like YouTube and Meebo is powered by Lighttpd. First released in March 2003, Lightpd is written in C language.
Although Apache is the most popular web server, it doesn’t give the best solution at times. Apache provides many Multi Processing Models for use in various run time environments. In the prefork model, apache processes are created at run time and are managed in a pool. Here each process consumes a considerable amount of memory. Imagine the memory consumption when you multiply this by the number of simultaneous processes created!! The total RAM can disappear all of a sudden. In contrast to this, the worker model uses multiple threads in place of processes. It is true that threads are lighter than processes. But you can’t rely on this unless your server is thread-safe! Of course, Apache is thread-safe but you can’t guarantee the safety for third party modules that are being used.
Some websites, which are limited by memory or threads, may have to serve several hundreds of files in parallel. Dan Kegel has addressed the issues encountered while handling several simultaneous connections in the C10K problem. This encouraged Jan Kneschke to design a much superior web server. Lighttpd is an asynchronous server. It runs as a single process with a single thread and non-blocking I/O. An asynchronous server is event driven. It needs only a single thread (or a few threads) and thus, it takes only very limited system resources. It also provides the advantage of web applications written in any programming language to run on the server since it supports FastCGI and CGI links to external programs. It also supports WebDNA which is the memory database system that is designed to build database driven websites. In contrast to the .htaccess file in Apache, it works with lightpd.conf file. Also, in Lightpd multiple denials of service vulnerabilities are reported
In short, Lighttpd is undoubtedly a high-quality web server, which suits well websites with dynamic content. Lighttpd is a promising alternative web server that is easy to configure and efficient than the resource hungry web servers.