Share via


Configuring Web Gardens

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

To improve availability for a Web site or application, you can increase the number of worker processes servicing the application pool by implementing a Web garden, an application pool that uses more than one worker process on a single computer. This might be helpful if you have already configured a single-application application pool and need to improve availability.

Creating a Web garden for an application pool enhances performance by providing the following benefits:

  • Robust processing of requests: When a worker process in an application pool is tied up (for example, when a script engine stops responding), other worker processes can accept and process requests for the application pool.

  • Reduced contention for resources: When a Web garden reaches a steady state, each new TCP/IP connection is assigned, according to a round-robin scheme, to a worker process in the Web garden. This helps smooth out workloads and reduce contention for resources that are bound to a worker process.

As a best practice, create Web gardens only for Web applications that meet the following criteria:

  • The application runs multi-instantiated, so that a different instance of the application can be assigned to each worker process.

  • The Web application is not CPU-intensive. If the CPU is the bottleneck, then adding worker processes cannot help improve performance.

  • The application is subject to synchronous high latency. For example, if an application calls a back-end database and the response is slow, then a Web garden supports other concurrent connections without waiting for the slow connection to complete.

Because Web gardens enable the use of multiple processes, all processes have their own copy of application state, in-process session state, caches, and static data. Web gardens are not advantageous for applications that depend on application state. Identify the standard relative performance in a Web garden before you decide whether Web gardens are the best solution for your server.

Note

A Web garden differs from a Web farm, which distributes the load across multiple Web servers. You can design Web farms to provide your applications with the highest availability. For more information about Web farms, see Scalability.

By default, the Web garden feature is disabled in IIS 6.0, and the default number of worker processes assigned to an application pool is set to 1. You can enable Web garden functionality by setting the number of worker processes assigned to an application pool to a number greater than 1.

For information about how to configure a Web garden by using IIS Manager, see Configure Application Pool Performance. For information about how to configure a Web garden by using a command-line procedure or scripts, see the MaxProcesses Metabase Property.