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.

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?

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
Thanks, but we want KeepAlive switched on. Connections are made from vast distances over potentially slow links so the connection time overhead could be significant. Fresh connections could be a buffering problem when streaming our media. –  David Newcomb May 17 '11 at 11:31
add comment
up vote 1 down vote accepted

I couldn't find a suitable solution, so wrote my own. I've documented the configuration settings in IIS and NLB. The article provides the HTTP module code you need in order to implement a MaxKeepAliveRequests setting to make sure no client remains glued to the same node in the NLB cluster.

Connection balancing across NLB using IIS and MaxKeepAliveRequests

http://www.bigsoft.co.uk/blog/index.php/2011/09/21/connection-balancing-across-nlb-using-iis-and-maxkeepaliverequests

share|improve this answer
add comment

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.