mod_annot editor

Annotate Section

The classic LAMP case

The classic solution to this, as provided for many years by application development environments such as mod_perl and PHP, is for the Apache server process to hold a database connection open, saving the overhead of opening and closing a connection for every request. With Apache 1.x, this is essentially the best you can do, and is the usual way of working.

However, this solution has its own problems. Although it substantially reduces the per-hit overhead, it introduces another: namely that of holding a large number of backend connections open. This in itself puts a load both on the webserver itself and the backend and limits the number of users that can be concurrently serviced. This doesn't just affect database-driven traffic: requests for static webpages also have to be served by an Apache process that is keeping an open connection to the backend.