MaxKeepAliveRequests for IIS7 (with NLB)

iis-7load balancingnlb

We have an IIS7 running on several nodes in an NLB cluster. The NLB nodes are set to Affinity:None so that new connections are spread across them. We want KeepAlive switched on so that we can get better performance but we are finding that when one of the nodes in the cluster goes away all its traffic moves on to other nodes but never moves back.
Although we are running web services we only have a few clients that do CPU intensive tasks so we are finding that one server will be being battered to death while the other sits there doing nothing!

We would like something like Apache's MaxKeepAliveRequests which limits the number of requests on a given connection so that IIS will periodically force clients to re-connect and therefore balance the cluster.

Is this something IIS7 supports? Is this what "normal" people do?

Best Answer

If it's a truly stateless session, you can disable KeepAlive altogether in IIS7 with:

appcmd set config /section:httpProtocol /allowKeepAlive:false

This shouldn't add a significant amount of overhead if most of the work is done by only a few clients. Be sure to test it first, though.

Related Topic