Monday, June 16, 2008

IIS 7.0 Worker Process Isolation Mode

Worker Process isolation mode is the standard processing mode for Web sites and Web applications. This mode allows sites and applications to:

Recycle worker threads

Monitor process health

Use advanced application pooling configurations

Take advantage of other IIS 7.0 features

The World Wide Web Publishing Service and Windows Process Activation Service provide the essential services for IIS 7.0. Service Host processes control all Web resources running on a server. Starting, pausing, or stopping the World Wide Web Publishing Service affects all Web sites on the server. It doesn't directly affect the Service Host. Instead, Windows Server uses an intermediary to control the Service Host for you. For non-Web services, this intermediary is the Inetmgr.exe process. A single instance of Inetmgr.exe is used to manage Web sites and Web applications.

Management of the Web service and Web applications is internalized. The Web Administration Service component of the Web Service Host is used to manage the service itself. Worker processes are used to control applications, and no ISAPI applications run within the IIS process context.

Worker processes are used in several ways:

Single worker process—single application Here a single worker process running in its own context (isolated) handles requests for a single application as well as instances of any ISAPI extensions and filters the application's need. The application is the only one assigned to the related application pool.

Single worker process—multiple applications Here, a single worker process running in its own context (isolated) handles requests for multiple applications assigned to the same application pool as well as instances of any ISAPI extensions and filters the applications' needs.

Multiple worker processes—single application Here, multiple worker processes running in their own context (isolated) share responsibility for handling requests for a single application as well as instances of any ISAPI extensions and filters the application's needs. The application is the only one in the related application pool.

Multiple worker processes—multiple applications Here, multiple worker processes running in their own context (isolated) share responsibility for handling requests for multiple applications assigned to the same application pool as well as instances of any ISAPI extensions and filters the applications' needs.

The standard operating mode ensures that all sites run within an application context and have an associated application pool. The default application pool is DefaultAppPool. You can also assign sites and applications to custom application pools.

Each application or site in an application pool can have one or more worker processes associated with it. The worker processes handle requests for the site or application.

You can configure application pools to manage worker processes in many ways. You can configure automatic recycling of worker threads based on a set of criteria such as when the process has been running for a certain amount of time or uses a specific amount of memory. You can also have IIS monitor the health of worker threads and take actions to recover automatically from failure. These features might eliminate or reduce your dependence on third-party monitoring tools or services.

You can also create a Web garden in which you configure multiple worker processes to handle the workload. Applications configured using this technique are more responsive, more scalable, and less prone to failure. Why? A Hypertext Transfer Protocol (HTTP) listener, called Http.sys, listens for incoming requests and places them in the appropriate application pool request queue. When a request is placed in the queue, an available worker process assigned to the application can take the request and begin processing it. Idle worker processes handle requests in first-in, first-out (FIFO) order.

Worker processes can also be started on demand. If there are unallocated worker processes and no current idle worker processes, IIS can start a new worker process to handle the request. In this way, resources aren't allocated until they're needed, and IIS can handle many more sites than it could if all processes were allocated on startup.


*.* Source of Information : Microsoft Press Internet Information Services (IIS) 7.0 Administrator's Pocket Consultant

No comments: