Building a Windows Server 2008 Network Load Balancing Cluster
Windows Server 2008 supports both Network Load Balancing (NLB) and Failover clustering. This chapter covers Network Load Balancing clustering. The topic of Failover clustering is covered in detail in the chapter entitled Building a Windows Server 2008 Failover Cluster.
An Overview of Network Load Balancing Clusters
Network Load balancing provides failover and high scalability for Internet Protocol (IP) based services providing support for Transmission Control Protocol (TCP), User Datagram Protocol (UDP) and general Routing Encapsulation (GRE) traffic. Each server in a cluster is referred to as a node. Network Load Balance Clustering is supported by all versions of Windows Server 2008 with support for clusters containing 2 up to a maximum of 32 nodes.
Network Load Balancing assigns a virtual IP address to the cluster. When a client request arrives at the cluster this virtual IP address is mapped to the real address of a specific node in the cluster based on configuration settings and server availability. When a server fails, traffic is diverted to another server in the cluster. When the failed node is brought back online it is then re-assigned a share of the load. From a user perspective the load balanced cluster appears to to all intents and purposes as a single server represented by the virtual Ip address.
The failure of a node in a cluster is detected by the transmission of heartbeats by each node. If a node fails to transmit a heartbeat for a designated period of time that node is assumed to have failed and the remaining nodes takeover the work load of the failed server.
Nodes in a Network Load Balanced cluster typically do not share data, instead each storing a local copy of data. Under such a scenario the cluster is referred to as a farm. This approach is ideal for load balancing of web servers where the same static web site data is stored on each node. In an alternative configuring, referred to as a pack the nodes in the cluster all access shared data. In this scenario the data is partitioned such that each node in the cluster is responsible for accessing different parts of the shared data. This is commonly used with database servers, with each node having access to different parts of the database data with no overlap (a concept also known as shared nothing).
Network Load Balancing Models
Windows Server 2008 Network Load Balancing clustering can be configured using either one or two network adapters, although for maximum performance two adapters are recommended. In such a configuration one adapter is used for communication between cluster nodes (the cluster adaptor) and the other for communication with the outside network (the dedicated adapter).
The four basic Network Load Balancing modes are as follows:
- Unicast with Single Network Adapter - MAC address of network adapter is disabled and cluster MAC address is used. Traffic is received by all nodes in teh cluster and filtered by NLB driver. Nodes in the cluster are able to communicate with addresses outside the cluster subnet but node to node communication within cluster subnet is not possible.
- Unicast with Multiple Network Adapters - MAC address of network adapter is disabled and cluster MAC address is used. Traffic is received by all nodes in the cluster and filtered by NLB driver. Nodes within the cluster are able to communicate with each other within the cluster subnet and also with addresses outside the subnet.
- Multicast with Single Network Adapters - Both network adapter and cluster MAC addresses are enabled. Nodes within the cluster are able to communicate with each other within the cluster subnet and also with addresses outside the subnet. Not recommended for significant levels of traffic to specific cluster nodes.
- 'Multicast with Multiple Network Adapters - Both network adapter and cluster MAC addresses are enabled. Nodes within the cluster are able to communicate with each other within the cluster subnet and also with addresses outside the subnet. The ideal configuration for environments where there are significant levels of traffic to specific cluster nodes.