IIS Responses to Load-Balanced Application Pool Behaviors

Applies To: Windows Server 2003, Windows Server 2003 with SP1

IIS 6.0 is designed to work with a variety of hardware and software network load balancers. However, the introduction of application pools and health-monitoring features such as rapid-fail protection in IIS 6.0 has the potential to confuse load balancers when an application pool fails to respond to a request, or when IIS health-monitoring features act on a faulty application pool. This section describes how HTTP.sys and IIS respond to load balancers for various application pool failures or problems.

For Layer 3 and Layer 4 load balancers (that is, basic load balancers such as Network Load Balancing), when an application pool fails, IIS causes the load balancer to run a TCP reset command. For Layer 7 load balancers (more advanced load balancers that balance the load based on higher-level application data, such as URLs, session data, and cookies) HTTP.sys sends a 503 error and attempts to connect to the application pool again after a specified period of time. IIS can also be configured to shut down the faulty application pool altogether. These responses can remedy application failures at the application pool level instead of forcing the load balancer to fail over the entire server. These responses also allow healthy application pools to continue processing requests without forcing the load balancer to fail over the entire server.

Table 7.1 summarizes how HTTP.sys and IIS respond to load balancers for various application pool failures.

Table 7.1   IIS Responses to Load-Balanced Application Pool Behaviors

Condition Auto-Shutdown of Application Pool? Layer 7 Load Balancer Behavior Layer 3 and Layer 4 Load Balancer Behavior

The application pool entered rapid-fail protection.

Yes

HTTP 503 error

IIS resets the TCP connection.

The application pool CPU threshold was exceeded.

Yes

HTTP 503 error

IIS resets the TCP connection.

An administrator disabled the application pool or shut down the WWW service.

No

HTTP 503 error

IIS resets the TCP connection.

The kernel-mode request queue is full.

No

HTTP 503 error

IIS resets the TCP connection.

By default, the IIS metabase property LoadBalancerCapabilities is configured for Layer 7 responses (LoadBalancerCapabilities = 2). If your organization uses Layer 3 or Layer 4 load balancers, you will need to change this property in the IIS metabase to a value of 1.

Important

It is recommended that you back up the IIS metabase before you change the metabase. For additional information, see Working with the Metabase.

For more information about configuring load balancing, see the LoadBalancerCapabilities Metabase Property. For more information about the IIS 6.0 metabase, including how to change a metabase property, see Working with the Metabase.

IIS Response When a Load-Balanced Application Pool Enters Rapid-Fail Protection

When an application pool enters the rapid-fail protection state, HTTP.sys responds to requests with a 503 error. If IIS is configured to shut down the application pool when the application pool enters the rapid-fail protection state, IIS executes the auto-shutdown application pool command. For more information about rapid-fail protection, see Running IIS 6.0 as an Application Server. For load-balanced applications, HTTP.sys responds to requests in one of the following ways:

  • Layer 7 response. When HTTP.sys receives requests for an application pool that is in the rapid-fail protection state, HTTP.sys sends a 503 error. If IIS is configured to shut down the application pool when it enters the rapid-fail protection state, IIS executes the auto-shutdown application pool command. When the error has been resolved, the administrator must restart the application pool.

  • Layer 3 and Layer 4 response. When HTTP.sys receives requests for an application pool that is in the rapid-fail protection state, HTTP.sys resets the TCP connection that carried the request. If IIS is configured to shut down the application pool when it enters the rapid-fail protection state, IIS executes the auto-shutdown application pool command. When the error has been resolved, the administrator must restart the application pool.

For information about rapid-fail protection, see Running IIS 6.0 as an Application Server.

IIS Response When a Load-Balanced Application Pool Exceeds a Configured CPU Threshold

The IIS CPU monitoring feature allows you to configure a CPU threshold for a specific application pool. The IIS CPU monitoring feature includes the option to shut down an application pool if the CPU exceeds a configured maximum. For load-balanced applications, HTTP.sys responds to requests in one of the following ways:

  • Layer 7 response. When HTTP.sys receives subsequent requests for an application pool that has exceeded the configured CPU maximum, HTTP.sys sends a 503 error. If IIS is configured to shut down the application pool when it exceeds its CPU threshold, IIS executes the auto-shutdown application pool command. When the error has been resolved, the administrator must restart the application pool.

  • Layer 3 and Layer 4 response. When HTTP.sys receives requests for an application pool that has exceeded the configured CPU maximum, HTTP.sys resets the TCP connection that carried the request. If IIS is configured to shut down the application pool when it exceeds its CPU threshold, IIS executes the auto-shutdown application pool command. When the error has been resolved, the administrator must restart the application pool.

For information about CPU monitoring, see Running IIS 6.0 as an Application Server.

IIS Response When a Load-Balanced Application Pool Is Disabled by an Administrator or an Administrator Shuts Down the WWW Service

When an application pool is shut down, the requests that have already been queued in kernel mode are lost. A shutdown of this nature indicates serious application failure and presents a potential threat to the rest of the system if the application continues processing. Such an application failure can affect the integrity of data in custom applications. For this reason, all requests to that application pool should be stopped.

  • Layer 7 response. When HTTP.sys receives requests for a disabled application pool, or if the administrator shuts down the WWW service, HTTP.sys sends a 503 error. When the error has been resolved, the administrator must restart the application pool.

  • Layer 3 and Layer 4 response. When HTTP.sys receives requests for a disabled application pool, or if the administrator shuts down the WWW service, HTTP.sys resets the TCP connection that carried the request.

IIS Response When the Kernel-Mode Request Queue Is Full

A full kernel-mode request queue is a temporary state. After application queues finish processing other requests, the kernel-mode request queue will begin accepting new requests.

  • Layer 7 response. When HTTP.sys receives requests for an application pool but the request queue is full, HTTP.sys sends a 503 error.

  • Layer 3 and Layer 4 response. When HTTP.sys receives requests for an application pool but the request queue is full, HTTP.sys resets the TCP connection that carried the request.