Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.