Home > Articles > Operating Systems, Server > Microsoft Servers

  • Print
  • + Share This
This chapter is from the book

Leveraging Network Load Balancing for Improved Availability

Another method used to provide fault tolerance to system services in Windows Server 2003 is through Microsoft's second clustering technology, Network Load Balancing (NLB). An NLB cluster works by distributing the network traffic targeted across a cluster of host servers each running the clustered service. The load weight to be handled by each host can be configured as necessary. Hosts can be added dynamically to the cluster to handle increased load. Additionally, Network Load Balancing can direct all traffic to a designated single host, called the default host. Network Load Balancing allows all the computers in the cluster to be addressed by the same set of cluster IP addresses (but also maintains their existing unique, dedicated IP addresses).

Whereas MSCS is intended primarily for clustering services with dynamic content such as database, e-mail, and file and print services, NLB is best used in clustering services that provide static content. Good candidates for NLB would be Terminal services, VPN, proxy services, Web server applications, and streaming media services.

Choosing a Network Load Balancing Model

When an NLB cluster is created, a general port rule for the cluster is also created to define the type of network traffic that will be load-balanced. Additionally, the administrator will need to choose an operational mode, either unicast or multicast, for the cluster. Within the port rule, three types of filtering modes are available: Single Host, Disable Port Range, and Multiple Host. The combination of the operational mode with a filtering mode defines the NLB model for the cluster.

Most NLB clusters will leverage the unicast operational mode unless the functionality delivered by the cluster is specifically multicast services such as steaming media, Internet radio, or Internet training courses. NLB does not support a mixed unicast/multicast environment within a single cluster. Within each cluster, all network adapters in that cluster must be either multicast or unicast.

The filtering modes are defined as follows:

  • Single Host. This filtering mode directs the specified network traffic to a single host. For example, in an IIS Web farm in which only one server contains the SSL certificate for a secure Web site, the single host port rule will direct port TCP 443 (SSL port) traffic to that particular server.

  • Disable Port Range. This filtering mode specifies ports that the cluster will not listen on, dropping such packets without investigation. Disabling ports that do not need to be load balanced secures and enhances the performance of NLB clusters.

  • Multiple Host Range. The default filtering mode allows network traffic to be handled by all the nodes in the cluster. Application requirements will then determine the multiple host affinity configuration.

There are three types of multiple host affinities:

  • None. This affinity type can send a unique client's requests to all the servers in the cluster during the session. This can speed up server response times but is well suited only for serving static data to clients. This affinity type works well for general Web browsing and read-only file and FTP servers.

  • Class C. This affinity type routes traffic from a particular class C address space to a single NLB cluster node. This mode is not used too often but can accommodate client sessions that do require stateful data. This affinity does not work well if all the client requests are proxied through a single firewall.

  • Single. This affinity type is the most widely used. After the initial request is received by the cluster nodes from a particular client, that node will handle every request from that client until the session is completed. This affinity type can accommodate sessions that require stateful data.

Creating a Network Load Balancing Cluster

The Network Load Balancing Manager is a new tool in Windows Server 2003 that is used for creating and managing NLB clusters. Administrators still have the ability to configure NLB clusters through the network interface card properties page, or through the NLB.EXE command-line utility, though the preferred method is through the NLB Manager. The NLB Manager also simplifies the process by which additional nodes are added to the cluster.

To create a cluster, perform the following steps:

  1. Log on to the local console of a cluster node using an account with Local Administrator privileges.

  2. Click Start, All Programs, Administrative Tools, Network Load Balancing Manager.

  3. Choose Cluster, New.

  4. Enter the cluster IP address and subnet mask of the new cluster.

  5. Enter the fully qualified domain name for the cluster in the Full Internet Name text box.

  6. Enter the mode of operation (unicast will meet most of your NLB application deployments).

  7. Configure a remote control password to use the command-line utility NLB.exe to manage the NLB cluster remotely and click Next to continue.

  8. Enter any additional IP addresses that will be load-balanced and click Next to continue.

  9. Configure the appropriate port rules for each IP address in the cluster, being careful to set the correct affinity for the load-balanced applications.

  10. After creating all the allowed port rules, create disabled port rules to reduce network overhead for the cluster nodes. Be sure to have a port rule for every possible port and click Next on the Port Rules page after all port rules have been created. Figure 22.10 shows a best practice port rule for an NLB Terminal server implementation.

  11. Figure 22.10Figure 22.10 Port rule settings for NLB configuration.






  12. On the Connect page, type the name of the server you want to add to the cluster in the Host text box and click Connect.

  13. In the Interface Available window, select the NIC that will host the cluster IP address and click Next to continue.

  14. On the Host Parameters page, set the cluster node priority. Each node requires a unique host priority, and because this is the first node in the cluster, leave the default of 1.

  15. If the node will perform non–cluster-related network tasks in the same NIC, enter the dedicated IP address and subnet mask. The default is the IP address already bound on the network card.

  16. For nodes that will join the cluster immediately following the cluster creation and after startup, leave the initial host state to Started. When maintenance is necessary, change the default state of a particular cluster node to Stopped or Suspended to keep the server from joining the cluster following a reboot.

  17. After all the information is entered on the Host Parameters page, click Finish to create the cluster.

  18. When the cluster is ready for release to the production environment, add the HOST or a record of the new cluster to the DNS domain table.

Use the Network Load Balancing Manager to add nodes to the existing cluster by performing the following steps:

  1. Click Start, All Programs, Administrative Tools and right-click Network Load Balancing Manager.

  2. Choose the Run-as option and specify an account that has Administrative permissions on the cluster.

  3. Choose Cluster, Connect to Existing.

  4. In the Host text box, type the IP address or name of the cluster and click Connect.

  5. From the Clusters window, select the cluster and click Finish to connect.

  6. In the right pane, right-click the cluster name and choose Add Host to Cluster, as shown in Figure 22.11.

  7. Figure 22.11Figure 22.11 Choosing to add a host to the cluster.




  8. On the Connect page, type the name of the server you want to add to the cluster in the Host text box and click Connect.

  9. In the Interface Available window, select the NIC that will host the cluster IP address and click Next to continue.

  10. On the Host Parameters page, set the cluster node priority. Each node requires a unique host priority, and because this is the first node in the cluster, leave the default of 1.

  11. If the node will perform non-cluster–related network tasks in the same NIC, enter the dedicated IP address and subnet mask. The default is the IP address already bound on the network card.

  12. For nodes that will join the cluster immediately following the cluster creation and after startup, leave the initial host state to Started. When maintenance is necessary, the default state of a particular cluster node can be changed to Stopped or Suspended to keep the server from joining the cluster following a reboot.

  13. After all the information is entered in the Host Parameters page, click Finish to add the node to the cluster.

Network Load Balancing

Keep the following best practices in mind when setting up an NLB solution:

  • Use at least two network cards in each cluster host. Although it is not necessary, having more than one network adapter in a cluster host allows the administrator greater management flexibility. Using this configuration, one adapter is configured to participate in NLB, while the other can be used to access the computer for management or other purposes.

  • Do not enable NLB remote control. The Network Load Balancing remote control option presents many security risks, including the possibility of data tampering, denial of service, and information disclosure. It is highly recommended that you do not enable remote control and instead use Network Load Balancing Manager.

  • Set up all NLB hosts on the same subnet. No cluster interconnect is used by Network Load Balancing other than the subnet in which the cluster is located. To reduce the risk of switch flooding, the NLB nodes should be connected to an isolated switch or should be configured in a single VLAN if the switch and network support VLANs. For detailed information regarding VLAN configuration and avoiding switch flooding, refer to the network switch documentation.

  • Properly secure NLB hosts. Although NLB is configured to filter traffic, this should not be the only means of protecting NLB host computers from network attacks. The Network Load Balancing subnet must be physically protected from intrusion by unauthorized computers and devices in order to avoid interference from unauthorized heartbeat packets. Moreover, applications that run on NLB clusters should also be protected according to application security best practices.

  • + Share This
  • 🔖 Save To Your Account