• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

keep-alive off

S

serial-thrilla

Guest
i noticed that the default setting for apache is to have keep-alive on.

why does plesk turn it off?
 
Possibly for anticipated heavy traffic dynamic content webservers. Per the Apache docs:
The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be sent over the same TCP connection. In some cases this has been shown to result in an almost 50% speedup in latency times for HTML documents with many images. To enable Keep-Alive connections, set KeepAlive On.

For HTTP/1.0 clients, Keep-Alive connections will only be used if they are specifically requested by a client. In addition, a Keep-Alive connection with an HTTP/1.0 client can only be used when the length of the content is known in advance. This implies that dynamic content such as CGI output, SSI pages, and server-generated directory listings will generally not use Keep-Alive connections to HTTP/1.0 clients. For HTTP/1.1 clients, persistent connections are the default unless otherwise specified. If the client requests it, chunked encoding will be used in order to send content of unknown length over persistent connections.
This is just a supposition on my part, who really knows why any SWSoft programmer does what (s)he does.... :)
 
heavy dynamic content servers would not make a difference...

keep-alives won't be used if the content length is unknown with http/1.0

however, i can't find any statistics on this, but i would safely say that almost everyone is now using http/1.1, because if they weren't using http/1.1, they wouldn't even be able to view the websites created using hostname based virtualhosts.

now with http/1.1, we can use keep-alives with dynamic content because http/1.1 introduced chunked encoding.

therefore, keep-alive should be on by default!
 
Good point, my brain totally skipped over the .0 part of the docs... my bad...
 
Originally posted by serial-thrilla
i noticed that the default setting for apache is to have keep-alive on.

why does plesk turn it off?
It looks like the Apache KeepAlive directive is set to Off by Red Hat, not by Plesk.

Do you think it's safe to turn it on for all Plesk servers?

Thanks.
 
i have. it made a nice improvement because it doesn't have to make another connection for each image on the page.
 
Back
Top