In Apache's httpd.conf, keepalive refers to keeping the connection active, similar to a permanent connection to MySQL. In other words, if keepalive is set to on, then requests from the same client do not need to be connected again, to avoid the burden of adding a new connection to the server each time it is requested. KeepAlive connection Active time is of course limited by KeepAliveTimeout. If the time between the second request and the first request exceeds KeepAliveTimeout, the first connection is interrupted and a second connection is created. Therefore, in general, the image of more sites should be keepalive set to ON. But the number of seconds KeepAliveTimeout should be set is a question worth discussing. If the keepalivetimeout is set for too short a time, for example set to 1 seconds, then Apache will frequently establish new connections, of course, will consume a lot of resources, in turn, if the keepalivetimeout set too long, for example, set to 300 seconds, Then there must be a lot of useless connections in Apache that will take up the resources of the server, and it's not a good thing. So, in the end to set the keepalivetimeout to how much, depends on the site traffic, the configuration of the server depends. In fact, this is a bit similar to the MySQL mechanism, keepalive equivalent to mysql_connect or mysql_pconnect,keepalivetimeout equivalent to wait_timeout. Here is my configuration: KeepAlive on KeepAliveTimeout 3 consider that there are quite a few pictures on my website, so KeepAlive is set to ON, the General page two times the request interval will not exceed 3 seconds, so this setting, to the best health turn from: http:/ /edu.cnzz.cn/newsinfo/17275.aspx
Apache's keepalive and KeepAliveTimeout