2007-10-07

KeepAlive or not KeepAlive ?

After some readings and experiments with Apache 1.3X configurations (yet another time :), I got feeling KeepAlive is a Bad thing for the modern highload web sites and should be turned Off. Modern technique is about serving binary files (think, images) by a separate image server well designed for this (thttpd, lighthttpd, nginx,..), so Keep-alive won't need at all ! Browser gets page at one request (others parts of a page comes from image server) ! MaxClients apaches will stay occupied for KeepAliveTimeout seconds ( 15 sec by default !) doing nothing, which is a BAD thing for busy sites !

Turn KeepAlive Off if you have separate server for images, or at least set KeepAliveTimeout smaller (2-5 sec)

KeepAlive is a must have feature for images server, since average page contains > 10 images !