Chapter 10. Solving Common Deployment, Hosting, and Production Challenges

This chapter details several under-the-hood secrets for ASP.NET that you will rarely find documented on the Internet. You will also learn about deploying web farms and solving common production challenges. These real-world lessons will help you avoid repeating the same mistakes and save time and money in the long run.

Deploying Your Web Site in a Web Farm

A web farm is a cluster of multiple web servers running the same copy of code, serving the same web site, and distributing traffic among them in a load-balanced environment. Generally, you use a hardware load balancer or implement Network Load Balancing (NLB) for Windows to make multiple web servers respond to a fixed IP. The outside world sees only one IP; when traffic comes to that IP, it is distributed among the web servers in the web farm.

Figure 10-1 shows a web farm configuration where a load balancer serves a public IP 69.15.89.1.

Web farm with a load balancer
Figure 10-1. Web farm with a load balancer

Let’s say this IP is mapped to the domain www.Dropthings.OmarALZabir.com. When users go to www.Dropthings.OmarALZabir.com, traffic is sent to 69.15.89.1. The load balancer gets the incoming requests, and then, based on its load table and load balancing algorithm, it decides which of the web servers to send traffic to. Traffic never goes directly to the web servers from the Internet.

Web ...

Get Building a Web 2.0 Portal with ASP.NET 3.5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.