Network Load Balancing

Network Load Balancing Overview

Network Load Balancing (NLB), included in Windows 2000 and Windows Server 2003 can be used if you need to provide increased levels of availability for TCP/IP applications. All versions of Windows Server 2003 include NLB. While NLB is automatically installed, it is not enabled. In a NLB cluster, client requests are load balanced between the servers residing in the NLB cluster, as specified by configured load balancing parameters. Servers can be configured to share the processing of client requests. NLB can also reroute any requests that are sent to a failed NLB cluster server.

Network Load Balancing (NLB) is typically used to provide high availability for Internet applications. This is due to NLB being a clustering technology that works well for traffic based applications. A NLB cluster can host up to 32 servers. Servers in a NLB cluster are called hosts. Each host in the cluster runs a copy of identical application. To clients attempting to access the NLB cluster, the cluster is represented as being one entity. This is made possible by the virtual network adapter created on each host in the cluster. Each virtual network adapter has a unique IP address and MAC address. When a client sends an application request to the cluster, the IP address of the cluster is used, and not each specific host’s IP address. When the client request is received at the cluster, each host in the cluster receives the request. The Network Load Balancing service running on each host determines which host in the cluster should process the request.

The NLB servers use a statistical mapping that determines a host priority for an incoming packet, to identify the NLB server that should handle the request. Once the NLB server is identified for the packet, the remainder of the servers in the NLB cluster discards the packet. You can though configure a dedicated IP address for network traffic that should be routed to a specific cluster server. Each server in the NLB cluster utilizes and transmits heartbeat messages to identify the state of the cluster. The heartbeat message holds information on the state of the cluster, and the cluster configurations and associated port rules.

Servers in a NLB cluster, as mentioned previously, are called hosts. Each NLB cluster has a default host. The default host is the server in the cluster that has the highest priority. A priority is a unique number assigned to each host in the NLB cluster. The priority determines the handling priority for all requests which are not specifically load balanced according to port rules. The unique host ID also identifies each host in the NLB cluster.

The load weight factor can be used to distribute client requests between the hosts in the NLB cluster. You can configure heavy loads for robust servers, and configure light loads for servers that do not have great processing power. If no load weight is defined, then all servers in the NLB cluster have equal load weights. The lowest weight which can be assigned is 0, and the highest is 100.

Traffic distribution is the terminology used to refer to how client requests are distributed in the NLB cluster. Each server in an NLB cluster has the following IP addresses:

As mentioned previously, all client requests are sent to the cluster IP address, and are received by each host in the NLB cluster. The NLB driver configured for each server in the cluster functions between the network adapter and the TCP/IP protocol. The driver manages and assigns client requests to a server in the NLB cluster based on the specified port rules. Port rules direct traffic on specific ports to certain hosts in the cluster.

The servers in a NLB cluster send heartbeat messages to determine the state of the cluster. Each heartbeat message contains the following information:

Whenever servers are added to or removed from an NLB cluster, a process known as convergence occurs. Convergence enables the NLB cluster to reconfigure itself so that its configuration can include the server(s) which were added or removed. Convergence also takes place when a server in the cluster does not send a heartbeat message within 5 seconds. During the convergence process, all client requests are still handled by the NLB cluster.

The events which occur during convergence are listed here:

The advantages of NLB clusters are listed here:

Understanding Port Rules

Through configuring port rules, you can specify how client requests are processed by the servers in the NLB cluster. A port rule basically acts a filter on a specific port(s). You can specify a protocol parameter and a filtering mode to configure the manner in which traffic must be load balanced between servers in the NLB cluster.

A protocol parameter is used to specify which protocol should be filtered in the particular port range. Requests for the protocol specified in the protocol parameter are affected by the port rule, and all other requests are then handled by the default filtering mode defined in the Host Priority setting.

A port range is used to define the port or set of ports that a port rule is applicable for. Two port ranges that overlap are not allowed.

Each port rule has a filtering mode which indicates how client requests to the NLB cluster are processed by the hosts residing in the cluster.

You can configure the following filtering mode options:

Planning a NLB Cluster Implementation

A number of NLB installation requirements and few factors which you should consider are listed here:

When planning the NLB cluster you should include elements that are geared at increasing the availability of the NLB cluster:

A few factors that you need to determine before you can implement a NLB cluster are listed here:

Securing an NLB Cluster

A few strategies for securing an NLB cluster are listed here:

How to create a NLB cluster

  1. Click Start, click Administrative Tools, and then click Network Load Balancing Manager.
  2. Click the Cluster menu item and then select New.
  3. In the Cluster IP configuration area of the Cluster Parameters dialog box, specify the IP address, subnet mask and full Internet name for the new NLB cluster.
  4. In the Cluster operation mode section area of the Cluster Parameters dialog box, select the mode for the cluster.
  5. On the Cluster IP Addresses dialog box, click the Add button if you want to load-balance multiple IP addresses. Click Next.
  6. On the Port Rules dialog box, the default port rule is displayed. Click the Edit button to configure port rules.
  7. The Add/Edit Port Rule dialog box opens. You can add and remove port rules.
  8. Click Next on the Port Rules dialog box.
  9. On the Connect dialog box, provide the name of the host in the Host field and then click the Connect button.
  10. Specify the network interface which should be load balanced. Click Next.
  11. On the Host Parameters dialog box, specify the Priority, Dedicated IP address and Subnet Mask information for the host.
  12. Set the Default State of the host to Started.
  13. Click Finish.
  14. The Network Load Balancing Manager opens, displaying the new cluster.

Troubleshooting NLB clusters

You can use the Network Load Balancing Manager to view log entries created by activities of the NLB cluster.

The NLB log entries provide information on the following:

A few strategies for troubleshooting NLB clusters are summarized below:

For applications to be load balanced in an NLB cluster, the application has to meet the following requirements:




Bookmark Network Load Balancing

Latest Blog Posts


Copyright 2008 Tech-FAQ. All rights reserved.