Another aspect of the new IIS architecture that I find very interesting is the new process model called Worker Process Isolation Mode (WPIM).
The new WPIM allows for the isolation of application code in a worker process from other worker processes and also from all of the other architectural pieces within IIS6, such as WWW Service, IIS Admin Service and HTTP.SYS.
With WPIM, this allows for Web Applications/Sites to be managed separately from other applications, and things such as taking an application offline or recycling can be done independently of other applications. It also allows for new possibilities for the administration, monitoring, management and configuration of an application. This allows for the following features in IIS6:
- Multiple Application Pools - This allows you to group certain applications to one (or more) processes that will service the requests for these applications. This allows for different configurations of application pools for different applications (e.g. recycling configuration etc..) and also allows for applications to be isolated from each other (an application pool can be recycled, stopped, started without affecting others).
- Worker Process Recycling - A Worker process can be recycled at a scheduled time, by meeting a certain criteria such as no of requests, by the W3 ADM determining that the worker process is unhealthy or by manually recycling the process. The recycling is done by the W3ADM service and since the requests can be queued by HTTP.SYS when a recycling event is occurring the effect on HTTP being processed is minimized.
- Rapid Fail Protection - this is where an application pool is stopped, due to multiple failures within worker processes being detected within a certain period of time
- Application Pool Health Monitoring - This monitors the complete application pool and all of the worker processes that are within a pool, for unhealthy applications. When a unhealthy application is found (by not responding to pings etc..) the application is terminated and another Application Pool is started to service HTTP requests
- Web Gardens - This is where an Application pool has more than one worker process. In a Web Garden, it is HTTP.SYS that distributes the HTTP requests across the worker processes in an application pool
- Application Pool Identity - Each application pool has its own configurable process identity. By default the identity used is the "Network Service Account" which has limited rights and privileges.
When developing applications targeted at IIS6 it is important to know that these changes have taken place, as it is may have introduced a change that affects your application and this is especially the case if you are migrating applications from IIS5.x to IIS6.0. In the scenario that something new in the IIS 6 architecture is possible causing an issue, you have the option to revert back to the "IIS 5.0 Isolation Mode", which reverts back to an architecture that is more similar to IIS 5. It is important to note, that you should only really use "IIS5.0 Isolation Mode" if you really need it, as many of the features of IIS6 will be disable. The IIS 6.0 Technical Reference covers this in more detail.