lingerd – Setup and Installation

lingerd – Setup and Installation

WHAT IS LINGERD?

Under high load, a dynamic page server running Apache with mod_php spends a lot of its time doing an operation called “lingering close”, which amounts to waiting a second or two on a connection just to make sure it gets closed properly.

Lingerd, then, is a daemon (service) designed to take over this job. Unlike Apache, which uses one process per connection, lingerd can do thousands of lingers in parallel, from a single process. The end result is that Apache needs much fewer running processes to handle the same load, which greatly increases its scalability, and diminishes the load on the server.

For technical reasons, lingerd is only effective on servers where keep-alives are disabled. To get the most out of your servers, for a high traffic site, you need to have the dynamic webpages served from one Apache server, and the images and other static data from another. The dynamic page server can then use lingerd.
HOW STABLE IS IT?

Lingerd has been in production use for a few months, and has lingered nearly 2,000,000 connections with no errors, under Linux.

More testing is still needed under other platforms (eg BSD, Solaris). Lingerd is not portable to Windows.
WHERE DO I FIND IT?

The homepage for lingerd is at http://www.iagora.com/about/software/lingerd/

The daemon itself can be found at ftp://iagora.com/pub/software/lingerd/lingerd-0.94.tar.gz
HOW DO I USE IT?

Installing lingerd is fairly simple, but it does require recompiling Apache from source.

Here are some quick installation instructions for Apache with mod_php and lingerd (see http://www.phpbuilder.com/manual/install-unix.php for more details), under Unix or Linux: