Load Balancing Your Web Server

Have you ever been given the challenge of load balancing your Web servers? You can accomplish this task in several ways, ranging from the simple and inexpensive to the complex and costly. Which way is best for you depends on what type of content you're serving.

The simplest load-balancing method uses DNS round-robin. The concept is simple: Your DNS administrator fills the domain tables with multiple address records (called A records) that have the same host name but point to one or more IP addresses that serve the same Web content. As the DNS request is looking for your DNS server, the Web server responds to the client with the next address from the list. The client uses that DNS address for as long as the Time to Live (TTL) value that you assign in that domain's zone file (i.e., a file that contains all the DNS records and configuration files for that DNS domain). You can optionally assign specific TTL values to individual records as well.

Cost might make this approach attractive, but it has several drawbacks. One drawback is that DNS has no idea whether the Web server is answering properly. DNS isn't sensitive to the state of your Web server and will continue to direct users to your server even if it's down. The other problem is that this method works only for relatively static content. If you use dynamic content and code where a session must be maintained when you open it, then round-robin isn't for you.

The second method is to use Network Load Balancing Service (NLBS), called Windows Load Balancing Service (WLBS) in Windows NT 4.0. NLBS is a software-based load-balancing service that requires you to configure multiple IP addresses on each server. Although the software has a single-card method, I strongly recommend that you use two NICs for simpler setup and management. This service regularly checks each server in the cluster to ensure that it's up. If a server goes down, that server fails the check, and the rest of the cluster will recover after dropping the failed server. One drawback of NLBS is cost: Each server must run either NT Server, Enterprise Edition or Windows 2000 Advanced Server (AS). NLBS doesn't monitor specific services, such as IIS, WINS, or DNS services, so if a service fails but continues to run, NLBS won't detect it. I've used this service reliably for about a year now and have had good luck (and uptime) with it.

A third method is to use a hardware solution for load balancing. Cisco's Local Director is a perfect example of such a solution. The Local Director lets you set up a virtual server that can bounce requests to one or more Web servers behind the Local Director. Probes, which monitor the health of servers in the background, can sound the alarm for a failed server or IIS service and redirect requests to the remaining Web servers. As you might suspect, this approach is costly, but it gives you the ability to redirect in case of service failure.

Another hidden cost of these solutions includes the cost of making sure the content is replicated among the servers. I've used NSI Software's DoubleTake for this solution. It is a solid product you can rely on, but it's a bit pricey. Next time, I'll discuss how fault tolerance affects load balancing.

TAGS: Windows 8
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.