In response to this, NCSA HTTPd now allows for multiple requests to be handled over a single connection with browsers which support this feature. Using one such browser, NCSA Mosaic for Windows, we found a speed increase of up to 30% using this feature. Of course, the actual performance improvement in practice will depend on the particular connection.
KeepAlive on | off
Where the syntax "on | off
" means that either "on"
or "off" may be present. This directive allows the administrator to enable
or disable keepalive.
KeepAliveTimeout N
Where N
is the number of seconds to maintain the connection
between requests. If N seconds passes since the last client request on
the connection, the server will close the connection.
MaxKeepAliveRequests N
Where N
is an integer indicating the maximum number of
requests that the server will accept during a keepalive session. After
the client has issued this many requests, the server closes the connection.
The default for KeepAliveTimeout is 10 seconds. However, experience and experimentation will probably be required to determine a "good" value.
The default for MaxKeepAliveRequests is 5. However, if you do not want a limit imposed, you can use a maximum value of 0, which will then allow any number of requests during a keepalive session. For example:
MaxKeepAliveRequests 0
Shortly after implementing the keepalive feature in HTTPd, a similar mechanism known as session extension, was proposed by the IETF for HTTP1.1. The mechanics are similar to our current implementation, but there are differences. We will most likely be modifying our keepalive implementation to be compatible with the session extension proposal during this beta. This should, for the most part, be transparent to the administration of HTTPd.
For Developers: