Impact of Connection Close vs Keep-alive

connectionhttp-headerskeepalive

I'm configuring our servers, and due to the nature of our load balancer, we can't send connection keep-alive headers. I'm trying to determine the impact of sending these headers to both the end-user and the server. Will either one notice anything?

Best Answer

First and foremost, yell. Loudly. At your vendor. For having a product not supporting the over-a-decade-old HTTP/1.1 protocol.

The impact of not having persistent connections is a major increase in loading time of resources. With keep-alive, a single TCP connection can be used to request multiple resources; without, a new TCP session (with a new three-way handshake - and, if you use SSL, a new SSL negotiation) is required for each and every resource on the page.

In practical terms, the impact will depend on the number of resources on a page, the round-trip time between client and server, and the number of concurrent requests a client's browser is making at a time (modern browsers run ~6ish by default). Lots of resources per page and distant clients will mean a very noticeable increase in page load times.