Because applications in an application pool are separated from other applications by the worker process boundaries, applications in one application pool are not affected by problems with applications in other application pools.
Windows 2003 supports both operating modes, and the default is the ISS 6.0 worker process isolation mode. Worker process isolation mode prevents one application or site from stopping and affects another application or site, greatly enhancing the reliability of IIS. So how do you set up two modes of work?
Start IIS Manager, right-click the Web site, select Properties, and open the Properties dialog box (Figure 1).
In IIS 6.0 worker process isolation mode, all application code runs in an isolated environment, how are they isolated? Windows 2003 has new application pools, and worker process isolation mode allows customers to create multiple application pools, each of which can have different configurations. Because these application pools receive their requests directly from the kernel rather than the WWW service, performance and reliability are enhanced. To isolate Web applications running on the same computer but belonging to different Web sites, you need to create a separate application pool for each Web site.
Creating an application pool
In IIS Manager, open the local computer, right-click Application pool, and choose New application pool (you must be in worker process isolation mode to establish an application pool). Application Pool Name box, enter a new application pool name. If the ID that appears in the Application pool ID box (such as: AppPool #1) is not what you want, you can rename it. If you clicked use an existing application pool as a template, right-click the application pool that you want to use as a template in the Application pool name box. The last click [OK].
Assigning application Pools
In IIS Manager, right-click the application for which you want to assign an application pool, and then click Properties. Click the Home Directory tab to confirm that the application name of the directory or virtual directory you are assigning is filled in. If the Application Name box has not been filled in, click Create, and then enter a name.
In the Application Pool list box, select the name of the application pool that you want to assign to it. The last click [OK].
Take a look at some of the problems with the application pool. The application pool's Properties dialog box has four pages--recycling, performance, health, identity, as shown in Figure six. The most compelling of these options pages is the "recycle" page, which you can use to manage the recycling of worker processes. In worker process isolation mode, IIS can be configured to periodically restart worker processes in the application pool to better manage those working processes that have errors. This ensures that the applications in the pool are functioning correctly and that the lost system resources can be recovered. In order to recycle worker processes, the ability of a failed worker process to receive requests is limited until it finishes processing all remaining requests stored in the request queue. In order to discharge the current request, the process configuration restrictions can be given. The replacement worker process for the same namespace group starts before the old worker process stops, preventing service disruption. The old process completes its pending request and then shuts down gracefully, or terminates the process explicitly if the configured time limit, number of requests, set time schedule is reached, or if the specified amount of memory limit has not been closed. By default, the application pool is recycled every 1740 minutes (29 hours).
W3SVC determines whether the application pool is running correctly based on the options on the health page, including: Ping the worker process at a specified time, in seconds, Default value 30 seconds start time limit (worker process must start in specified time) Close time limit (worker process must close within specified time) to start quick Fail Protection (disable application pool if a certain number of worker processes fail during a specified period of time). In addition, ISAPI applications, including ASP. NET and Asp.dll) can declare that they are no longer suitable for service and require recycling.
By default, when IIS 6.0 reclaims a pool, it uses a recycling technique called overlapped recycle. In this recycling mode, the failed worker process remains running while a new worker process is created. IIS 6.0 passes the new incoming request to the new worker process, but does not remove the old worker process until the old worker process finishes the request in its queue, or encounters a timeout error. During this time, TCP/IP connections are not lost because there are http.sys to keep the connection valid. When a failed worker process timeout occurs, the next request passed to the worker process is a new request, so the session information that was originally saved in the process is lost. All such recycling operations are done automatically without administrator intervention, and in most cases do not cause significant service disruption. If necessary, you can set the value of the configuration Data property logeventonrecycle to 1 to indicate that W3SVC generates an event log record when the recycle operation is performed.
For applications that cannot run with multiple instances, overlapped recycle recycling technology can cause problems. If you encounter this type of problem, you can set the value of the configuration Data property dissallowoverlappingrotation to True (1), and the process "overlap" occurs when an application pool recycle operation is turned off. In addition, for a failed worker process, sometimes we may not want to remove it, still keep the process in order to detect and look for the cause of the problem, you can set the configuration Data property OrphanActionExe to the name of the execution file, making the worker process "orphan" when the execution file remains running.
Another feature associated with application pooling is that IIS 6.0 allows the application pool to be configured as a Web garden (Web Garden). To understand the concept of a Web garden, imagine a scenario where you have an IIS 5.0 server and three Web sites, each running the same application, and if IIS 5.0 is able to automatically send requests sequentially in a circular circular mode to these features equivalent, In fact, a separate Web site, which separates the load into three different processes, can form a small Web farm (Web Farm)--This is the Web garden.
In the Web garden of IIS 6.0, we do not have to create additional Web sites, as long as we specify the number of worker processes for an application pool. The specific configuration step is to open the Properties dialog box for the application pool, go to the Performance page, and enter the number of processes in the maximum number of worker processes input box under Web Garden, as shown in Figure eight. IIS 6.0 automatically reduces the number of actual worker processes after a certain amount of time (default 20 minutes, configurable) when the server's load is small and no additional worker processes are required, if the load becomes large, additional worker processes are required, and IIS 6.0 increases the number of worker processes again. All of this is done automatically without the need for administrator intervention.
Figure 6
Two new configuration data Properties--smpaffinitze and SmpaffinitzeCPUmask-- Allow configuration of specific processors assigned to worker processes: Setting the SMPAffinitized property to true means that specific worker processes assigned to the application pool should be assigned to a specific CPU. The SMPProcessorAffinityMask property is used to configure a hexadecimal processor mask that indicates which CPUthe worker process in the application pool should be bound to.
Current 1/2 page
12 Next read the full text