2

Say I have a web farm of six IIS 7 web servers, each running an identical ASP.NET application.

They are behind a hardware load balancer (say F5).

Can the load balancer detect when the ASP.NET application worker process is restarting and divert traffic away from that server until after the worker process has restarted?

frankadelic
  • 20,543
  • 37
  • 111
  • 164

4 Answers4

1

What happens during an IIS restart is actually a roll-over process. A new IIS worker process starts that accepts new connections, while the old worker process continues to process existing connections.

This means that if you configure your load balancer to use a balancing algorithm other than simple round-robin, that it will tend to "naturally" divert some, but not all, connections away from the machine that's recycling. For example, with a "least connections" algorithm, connections will tend to hang around longer while a server is recycling. Or, with a performance or latency algorithm, the recycling server will suddenly appear slower to the load balancer.

However, unless you write some code or scripts that explicitly detect or recognize a recycle, that's about the best you can do--and in most environments, it's also really all you need.

RickNZ
  • 18,448
  • 3
  • 51
  • 66
0

IIS 6 and 7 restart application pools every 1740 minutes by default. It does this in an overlapped manner so that services are not impacted.

http://technet.microsoft.com/en-us/library/cc770764%28v=ws.10%29.aspx

http://forums.iis.net/t/1153736.aspx/1

On the other hand, in case of a fault, a good load balancer (I'm sure F5 is) can detect a fault with one of the web servers and send requests to the remaining, healthy web servers. That's a critical part of a high-availability web infrastructure.

northben
  • 5,448
  • 4
  • 35
  • 47
0

We use a Cisco CSS 11501 series load balancer. The keepalive "content" we are checking on each server is actually a PHP script.

service ac11-192.168.1.11
  ip address 192.168.1.11
  keepalive type http
  keepalive method get
  keepalive uri "/LoadBalancer.php"
  keepalive hash "b026324c6904b2a9cb4b88d6d61c81d1"
  active

Because it is a dynamic script, we are able to tell it to check various aspects of the server, and return "1" if all is well, or "0" if not all is well.

In your case, you may be able to implement a similar check script that will not work if the ASP.NET application worker process is restarting (or down).

gahooa
  • 131,293
  • 12
  • 98
  • 101
0

It depends a lot on the polling interval of the load balancer, a request from the balancer has to fail in order before it can decide to divert traffic

Sander Rijken
  • 21,376
  • 3
  • 61
  • 85