Web applications can be subject to considerable traffic. A popular Web site might have to support hundreds or thousands of simultaneous users. The following sections describe server architectures that help handle this load reliably. Web GardensA Web garden is a Web application whose execution is distributed across more than one processor on a multiprocessor computer. For example, suppose that you've installed an ASP.NET application on a computer with eight CPUs. In this case, ASP.NET would automatically launch eight worker processes to handle incoming Web requests and assign one of these processes to each CPU (a procedure known as setting the affinity of the process). Web gardens offer the benefit of faster response times on multiple-CPU computers. In particular, if one worker process becomes hung or slowed down because of programming errors or unexpected input, the Web garden can continue serving requests using the other worker processes. Web gardening is the default behavior for ASP.NET. However, you might want to configure your Web server to not use every processor for Web gardening . To do this, you can set the value of the following two attributes in the <processModel> element of the web.config file:
Web FarmsA Web farm takes the concept of a Web garden and extends it to multiple computers. In a Web farm, your application runs on multiple Web servers simultaneously . Some mechanism outside the Web servers is used to distribute requests to the individual servers. Web farms are typically enabled by a technique known as network load balancing ( NLB ). Web farms offer the benefits of both scalability and reliability. Your application is more scalable because you can increase its capacity by adding more computers to the Web farm, and your application is more reliable because a failure of any one server does not affect the other servers. ClustersClustering provides a second method of combining multiple computers for a single purpose. The goal of clustering is not to provide additional scalability, but to provide additional reliability. In a cluster, multiple computers are configured using the same software, but only one of these computers is active at any given time. The active server handles all the requests unless it experiences a hardware or software failure. At that point, the clustering software automatically directs requests to the standby server, which becomes the new active server. Clustering is a built-in feature of the Windows Server operating systems. You can also use products such as Microsoft Application Center to make managing software on a cluster easier. |