Create a Cluster to Balance the Network Load

Network load balancing clusters offer increased fault tolerance and improved performance for server-based applications. Best of all, the technology has been supported in every Windows networking operating system since NT 4.0.

By Drew Bird | Posted Apr 27, 2004
Page 1 of 2
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn
It used to be that the mere mention of clustering was enough to send a shudder through anyone holding the purse strings on a company's network infrastructure. Today, things are different. With operating systems sporting integrated clustering capabilities and the cost of hardware falling at an ever-increasing rate, the benefits of clustering can be had by organizations of almost any size and with any budget.

“On Windows Server 2003, up to 32 systems can be included in a single NLB cluster, although the cluster can be created with just two machines and then be scaled as needed. ”

Although Windows server platforms have provided clustering capabilities since Windows NT 4.0, the clustering features in Windows Server 2003 are now much easier to implement. It's just one more reason, if you have not already done so, to take a look at clustering for your network.

Windows Server 2003 supports two types of clustering — server clustering and network load balancing. Server clustering is a relatively complex topic, and one that generally involves the purchase of at least some additional hardware. Although it is unarguably the more powerful and versatile of the two clustering methods, this need for additional hardware is often enough to discourage most people.

Network load balancing, however, is much less complex than server clustering, and offers similar benefits: increased fault tolerance and improved performance for server-based applications. Fault tolerance comes from the fact that more than one server is hosting an application. If a server in the cluster fails, users can continue to access the application via one of the other servers in the cluster. Increased performance is provided by virtue of more than one physical computer system answering requests from clients.

In an NLB cluster, multiple systems appear to the network as a single entity. On Windows Server 2003, up to 32 systems can be included in a single NLB cluster, although the cluster can be created with just two machines and then be scaled as needed. From an end-user perspective, the operation of a cluster is invisible. They will have no way of knowing that the application they are accessing is being hosted in a cluster, but they will appreciate the additional performance.

How NLB works
In its most basic form, NLB is a mechanism for distributing incoming requests among multiple network interfaces. When a request is received via the IP address assigned to the cluster, one of the servers in the cluster takes the request and processes it. The other servers in the cluster ignore the request. The next request that comes in goes to one of the other servers, and so on until the original server answers another request.

Although the principle is straightforward, the mechanics behind such a system are quite complex. For example, TCP/IP communication relies on the fact that an IP address can be resolved to a Media Access Control (MAC) address, which is encoded on a network interface. In a regular system this equates to one IP address per MAC address and vice versa.

In the case of NLB, a single IP address must equate to more than one MAC address — the MAC address of each system in the NLB cluster. This is achieved by the use of a software based virtual network adapter that sits between the network adapter and its regular network card driver. The virtual network adapter has an IP address and MAC address associated with it that is used as the external presence of the cluster. Because the virtual network adapter is aware of the real IP and MAC addresses of the systems behind it in the cluster, it is able to channel requests through to systems using this information.

Each system in an NLB cluster receives every request, but elects to process onlycertain requests based on a mathematical algorithm. It's easy to gain a simple understanding of the process through the following example. Let's imagine that there are four technical support operators manning a help desk. The four agree that each will answer one in every four calls, in order. So, operator 1 will answer calls 1, 5, 9, 13 and so on. Operator 3 on the other hand will answer 3, 7, 11, 15 and so on. Once the initial agreement is made, the only communication required between the operators is to make sure that the other operators are still answering calls. If one of the operators were to stop answering calls for some reason, the other operators must detect this and shift their call-answering ration to 1:3. Otherwise, every fourth call would go unanswered.

To detect the presence of the other servers in the cluster, NLB uses heartbeat messages that are sent among the servers. If a server doesn't receive a heartbeat message from one of the other servers in the cluster, that server recalculates the clustering algorithm to accommodate the change. When the missing server comes back online, the other servers in the cluster detect the presence of the server and once again recalculate the algorithms. All of this calculating and recalculating is done automatically, and, in general, the end users using the applications hosted on the servers in the NLB cluster will be oblivious to the change.

Continued on Page 2: What Can You Use NLB for?

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter