Is it better to disable Keep-Alive in IIS 7 for high traffic web applications?

5,830

Keepalive is handy for servers that distribute multiple/many resources per page request. If you have your servers host the html, css, js, images, etc Keepalive will allow downloading multiple files per connection. It takes some small time to establish a tcp connection, and for it to ramp its speed up.

However, if you are just host single resources and any dependent resources are pulled from a cdn or don't exist, then disabling keepalive can allow the server and load balancer to close the connection sooner.

Share:
5,830

Related videos on Youtube

m5khan
Author by

m5khan

Updated on September 18, 2022

Comments

  • m5khan
    m5khan almost 2 years

    The advice below applies to Apache, but it seems generic enough to apply regardless of system. My architecture is 3 web servers behind a load balancer. My IIS servers currently have keep-alive enabled with the default connection timeout of 2 minutes. Would disabling my site's keep-alive increase performance and throughput?

    First, disable keep-alive. This is the nastiest thing against performance. It was designed at a time sites were running NCSA httpd forked off inetd at every request. All those forks were killing the servers, and keep-alive was a neat solution against this.
    ...
    If the keep-alive time is too short to maintain the session between two clicks, it is useless. If it is long enough, then it means that the servers will need roughly one process per simultaneous user, not counting the fact that most browsers commonly establish 4 simultaneous sessions ! Simply speaking, a site running keep-alive with an Apache-like server has no chance of ever serving more than a few hundreds users at a time.

    http://1wt.eu/articles/2006_lb/index_10.html