IIS timeout for active connections

iisnet

Is it possible to set a timeout for active connections in IIS? I know that you can set a timeout for idle connections.

What leads me to ask this question is a scenario with a load balancer in front of a bunch of nodes running IIS. In order to support painless declustering of nodes without forcible disconnects on active connections we'd like to enforce a timeout on all active connections. Given this we could remove the node from the cluster and then wait the duration of the timeout for traffic to drain.

As it is clients have to be written to play nice with our load balanced setup by controlling their connection lease. This is obviously possible but kind of a pain. If we could control it server-side clients would not have to care about it.

Best Answer

The only way I could think to pull this off is to have a batch or scheduled task that turns off the IIS service so you can do what you needed to do. That same object can then turn it back on as well.