WebHostGear.com - the hosting resource for professionalshosting tutorials 
hosting howto webhost guide server managementJuly 23, 2008
server management, apache tutorials, hosting tutorials, cpanel, server security
Home / Hosting Tutorials / lingerd - Setup and Installation

lingerd - Setup and Installation



Printer Friendly Printer Friendly Send to a friend Send to a friend
By : Codepic Rating : Average Rating : 10.00 From 1 Voter(s)

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?


Article provided by WebHostGear.com
The homepage for lingerd is at http://www.iagora.com/about/software/lingerd/



Article provided by WebHostGear.com

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:


1.  tar zxvf apache_1.3.x.tar.gz
2.  tar zxvf php-3.0.x.tar
3.  tar zxvf lingerd-0.94.tar
4.  cd lingerd-0.94
5.  vi config.h
    (set the right directories for SOCKPATH and PID_FILE; these directories
     must be writeable by the userid that Apache runs as)
6.  vi apache-1.3/ap_lingerd.h
    (set SOCKPATH here too)
7.  make ; make install
    (also set the system up to start lingerd automatically, e.g by
    adding the line "/usr/local/sbin/lingerd" to your
    /etc/rc.d/rc.local file)
8.  cp apache-1.3/ap_lingerd.* ../apache_1.3.x/src/main/
9.  cd ../apache_1.3.x
10. patch -p0 -d src/ < ../lingerd-0.94/apache-1.3/aplinger.diff
11. ./configure --prefix=/www
12. cd ../php-3.0.x
13. ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
14. make ; make install
15. cd ../apache_1.3.x
16. ./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a
17. make ; make install

To see if lingerd is running, and how many connections it has been handling, watch out for its messages in /var/log/messages.

Lingerd is not tightly tied to the dynamic programming language, so it can be used with PHP3, PHP4, and also with other scripting engines like mod_perl, mod_snake or mod_dtcl.

You can find more information about lingerd in its homepage at http://www.iagora.com/about/software/lingerd/ , and in the documentation files included in the distribution.

New! - Need server help? Hire an Expert

Get professional help with your configuration, script installation or server issue.
Learn how we can help you with any server problem and make your server run like new. Professional staff will contact you, after submitting a quote request, by phone or email.

Rate this Article :

1

2

3

4

5

6

7

8

9

10
Poor Excellent
Sources
http://www.phpbuilder.com/news/item.php?id=219

Related Articles


» Force (SSL) secure logins in WHM and Cpanel
» Apache Log Files Explained
» Linux Apache ASP for Cpanel
» Howto mod_rewrite with Apache


Discuss this article with others in our new hosting forums

Comments / Feedback

 Add Comment
Name
Email
Image Code
Refresh Image

Comments / Feedback



Web Hosting News RSS ?


WebHostGear Hire an Expert - NEW!
Let us improve your servers performance, find that spammer and take care of that kernel upgrade. Hire us to help with any tutorials listed on the site or any other services needed. Get your free, NO obligation quote now

Our site offers free hosting tutorials, cpanel tutorial, web hosting news, shell commands, running a web hosting business, dedicated guides, linux tutorial, apache install, home web server, web server guide, ssh commands, dedicated servers, DNS nameservers, chkrootkit, apf firewall, exim configuration, server compromised, cron backup solution, ftp backup script

Server Tutorials


WebHostGear Reviewed by Ping Zine - Click here

Special Offer:


Links:
cPanel server administration

MidPhase Coupons

Reseller Hosting

Reseller Hosting FAQ

Icon

Web Hosting

Datacenter Discussion Forum

Lunarpages Coupon

Hosting Coupon



WebhostGear Sponsors
Going Up Advertise Hosting Free Uptime Check Web Hosting Chat Icons Banners Mall