As I mentioned in IIS6 and Windows 2003 (Part 6), another aspect of the new architecture in IIS 6 that I find very interesting is the new process model, which is called Worker Process Isolation Mode (WPIM).
The first hint that things are different in the process model for IIS 6 from its predecessors is that your web sites are no longer in a process called Inetinfo.exe or DllHost.exe. When using WPIM in IIS6, your web application(s) are hosted in a process called W3wp.exe. This brings some great benefits to the overall architecture, such as:
- Web Application code always runs in a process that is separate and distinct from all of the architectural aspects of IIS. That means if something goes wrong within a Web Application and/or it needs to be recycled, the IIS architecture and other Web Applications are not affected. This is unlike previous versions, where something could cause InetInfo to hang/crash and affect all Web applications.
- Web Applications can be grouped into an application pool.
- An application pool can contain one or more worker processes, when an application pool is configured to have more that one worker process this is called a Web Garden.
- Architectural pieces within the IIS architecture, such as W3ADM, can monitor the health of a worker process and recycle it due to a recycle criteria or a possible error/failure within a worker process. This minimizes the effect on other worker processes, on new requests being processed and increases the availability of IIS6. Note that it is HTTP.SYS that is the URI endpoint, so it will queue valid URI requests for a period of time, while a new worker process is being started.
- When IIS6 is configured to use WPIM (which is the default on a clean installation, but not the case in an upgrade), ASP.NET will use the WPIM process model for the processing of ASP.NET requests and hence ASP.NET will have access to all of the features in IIS6 such as use application pools, worker process recycling, and application pool health monitoring. In previous versions of IIS this would be different, as you would have a separate process model called the Aspnet_wp.exe that would be separate from the base architecture for IIS.
All of this greats a very robust, flexible and feature rich environment in which to run your web applications. While all of this is good stuff, there are a few possible problem areas when moving an application from a previous version of IIS to IIS 6. These are:
- IIS 6 is not installed out of the box, and as mentioned in IIS6 and Windows 2003 (Part 1), you may be using a service that you are not aware of and this is something that you need to be aware of.
- if you are doing an upgrade of a server from a previous version of Windows Server to Windows Server 2003, WPIM is disable and hence many of the features of IIS6. This is to maximize backward compatibility
- The application pools (and worker processes) run under a new security account, called Network Service. This is account has very limited security rights on the local server and this may cause issues when moving web applications from previous versions of IIS.
From my own experience, it is the change in security privileges that can be the most likely candidate to cause an issue when migrating web applications to IIS6. Typically there is no problem, but some web applications I have seen go through the process of migration to IIS6 have used certain security privileges for 3rd party components (such as database drivers) and these have been tricky to track down!