HTTP keep-alive-sky-blog
HTTP keep-alive
HTTPKeep-Alive
Keep-AliveThis function keeps the client-to-server connection valid. When a subsequent request to the server appears,Keep-AliveFunction to avoid or re-establish a connection. Most Web servers on the market, including iPlanet, IIS, and Apache, Support HTTPKeep-Alive. This feature is usually useful for websites that provide static content. However, for websites with heavy load, there is another problem: Although the benefits of retaining opened connections for customers are also affected, this is because resources that can be released are still occupied during the processing pause. When the Web server and Application Server run on the same machine,Keep-AliveThe function has a particularly significant impact on resource utilization. This function is preset for HTTP 1.1.Keep-AliveThe header can also provide the HTTP continuous function.
Keep-Alive: Timeout = 5, max = 100
Timeout: The expiration time is 5 seconds (corresponding to the parameter in httpd. conf: keepalivetimeout), Max is a maximum of one hundred requests, force disconnection
A new connection is established within the timeout time, and Max is automatically reduced by 1 until it is 0, which is forced to be disconnected. See the following four figures. Note that the value of date is within 5 seconds )!
Related settings in Tomcat are included in the connector element in server. xml.
Keepalivetimeout:
The number of milliseconds this connector will wait for another HTTP request before closing the connection. The default value is to use the value that has been set for the connectiontimeout attribute.
Maxkeepaliverequests:
The maximum number of HTTP requests which can be pipelined until the connection is closed by the server. setting this attribute to 1 will disable HTTP/1.0Keep-Alive, As well as HTTP/1.1Keep-AliveAnd pipelining. setting this to-1 will allow an unlimited amount of Pipelined orKeep-AliveHTTP requests. If not specified, this attribute is set to 100.
HTTPKeep-Alive
Keep-AliveThis function keeps the client-to-server connection valid. When a subsequent request to the server appears,Keep-AliveFunction to avoid or re-establish a connection. Most Web servers on the market, including iPlanet, IIS, and Apache, Support HTTPKeep-Alive. This feature is usually useful for websites that provide static content. However, for websites with heavy load, there is another problem: Although the benefits of retaining opened connections for customers are also affected, this is because resources that can be released are still occupied during the processing pause. When the Web server and Application Server run on the same machine,Keep-AliveThe function has a particularly significant impact on resource utilization. This function is preset for HTTP 1.1.Keep-AliveThe header can also provide the HTTP continuous function.
Keep-Alive: Timeout = 5, max = 100
Timeout: The expiration time is 5 seconds (corresponding to the parameter in httpd. conf: keepalivetimeout), Max is a maximum of one hundred requests, force disconnection
A new connection is established within the timeout time, and Max is automatically reduced by 1 until it is 0, which is forced to be disconnected. See the following four figures. Note that the value of date is within 5 seconds )!
Related settings in Tomcat are included in the connector element in server. xml.
Keepalivetimeout:
The number of milliseconds this connector will wait for another HTTP request before closing the connection. The default value is to use the value that has been set for the connectiontimeout attribute.
Maxkeepaliverequests:
The maximum number of HTTP requests which can be pipelined until the connection is closed by the server. setting this attribute to 1 will disable HTTP/1.0Keep-Alive, As well as HTTP/1.1Keep-AliveAnd pipelining. setting this to-1 will allow an unlimited amount of Pipelined orKeep-AliveHTTP requests. If not specified, this attribute is set to 100.