Apache Keep Alive Directive

Today, I was analysing a website for performance improvements using the Page Speed tool by Google. One interesting thing I found out that it was recommending to enable the KeepAlive feature of Apache web server. Usually this is enabled by default, but somehow on the VPS I was working on, it was disabled. So if you need do this for your VPS or dedicated web server then, just put following lines in the “httpd.conf” file:

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

So what it does? As defined in the Apache reference here

The Keep-Alive extension to HTTP, as defined by the HTTP/1.1 draft, allows persistent connections. These long-lived HTTP sessions allow multiple requests to be send over the same TCP connection, and in some cases have been shown to result in an almost 50% speedup in latency times for HTML documents with lots of images.

Earlier the old browsers does not have the support for this, but at present almost all browser support this. So this may help you improve the page load time without doing hard work.

Scroll to top