Impact of Connection Close vs Keep-alive

18,675

Solution 1

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.

Solution 2

Keep alive will greatly enhance the performance on both the client and server side. If possible do not disable it. The load balancer should work fine with keep alive turned on.

Share:
18,675

Related videos on Youtube

Willemk
Author by

Willemk

Updated on September 18, 2022

Comments

  • Willemk
    Willemk almost 2 years

    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?

    • Admin
      Admin over 12 years
      sending these headers to both the end-user and the server - Huh? Can you be more specific about what you're looking to do? Where would the headers be sent from, and how would this work around your load balancer's limitation against HTTP keep-alive connections? Working keep-alive needs more than just a header, it needs cooperation from every device involved in the HTTP aspects of the connection.
    • Admin
      Admin over 12 years
      My wording may have been a little odd, but the server is obviously sending the headers. I'm trying to find out what impact will this have on the client and server.
    • Admin
      Admin over 12 years
      We have a rule which sends a subfolder to different server farm. When browsing from the root to the subfolder, the Keep-alive is keeping the connection open to the original server farm and not sending you to the intended server farm.
  • Mircea Vutcovici
    Mircea Vutcovici over 12 years
    You can have auth problems if you are using NTLM authentication and the keep-alives are disabled.
  • Willemk
    Willemk over 12 years
    I'm trying to quantify "greatly enhance". Also, our IT team is in talks with the loadbalance vendor about the issue.
  • Willemk
    Willemk over 12 years
    I've just checked, there are about 3 - 6 (depending on which page you're on) objects being loaded from that domain. This has me thinking that the slow down will be minimal, since it would have opened up ~6 concurrent connections anyways.
  • ravi yarlagadda
    ravi yarlagadda over 12 years
    @Willemk Yeah, that's very minimal for a typical page - the slowdown would be much more of a concern on a page loading dozens of objects. Should be just fine.
  • Willemk
    Willemk over 12 years
    CDN is taking most of the load.