Introduction to Network Load Balancing
Updated: January 21, 2005
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
Introduction to Network Load Balancing
The Network Load Balancing (NLB) service enhances the availability and scalability of Internet server applications such as those used on Web, FTP, firewall, proxy, VPN, and other mission-critical servers. A single computer running Windows can provide a limited level of server reliability and scalable performance. However, by combining the resources of two or more computers running one of the products in the Windows Server 2003 family into a single cluster, Network Load Balancing can deliver the reliability and performance that Web servers and other mission-critical servers need. The following diagram depicts two connected Network Load Balancing clusters. The first cluster consists of two hosts and the second cluster consists of four hosts:
Each host runs separate copies of the desired server applications, such as that for a Web, FTP, and Telnet server. Network Load Balancing distributes incoming client requests across the hosts in the cluster. The load weight to be handled by each host can be configured as necessary. You can also add hosts dynamically to the cluster to handle increased load. In addition, Network Load Balancing can direct all traffic to a designated single host, called the default host.
Network Load Balancing allows all of 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).
For load-balanced applications, when a host fails or goes offline, the load is automatically redistributed among the computers still operating. Applications with a single server have their traffic redirected to a specific host. When a computer fails or goes offline unexpectedly, active connections to the failed or offline server are lost. However, if you bring a host down intentionally, you can use the drainstop command to service all active connections prior to bringing the computer offline. In either case, when ready, the offline computer can transparently rejoin the cluster and regain its share of the workload.
Note If you plan to use Network Load Balancing in a 64-bit environment, you must use the 64-bit Network Load Balancing version. If you do not, the cluster will fail to form.
Overview of Network Load Balancing configuration
Network Load Balancing runs as a Windows networking driver. Its operations are transparent to the TCP/IP networking stack. The following diagram shows the relationship between Network Load Balancing and other software components in a typical configuration of a Network Load Balancing host:
Database access from load-balanced server applications
Some server applications access a database that is updated by client requests. When these applications are load balanced in the cluster, these updates need to be properly synchronized. Each host can use local, independent copies of databases that are merged offline as necessary. Alternatively, the clustered hosts can share access to a separate, networked database server. A combination of these approaches can also be used. For example, static Web pages can be replicated among all clustered servers to ensure fast access and complete fault tolerance. However, database requests would be forwarded to a common database server that handles updates for multiple Web servers.
Some mission-critical applications might require the use of highly available database engines to ensure complete fault tolerance for the service. It is recommended that you deploy cluster-aware database software to deliver highly available and scalable database access within an overall clustering scheme. One such example of this is Microsoft SQL Server, which can be deployed with the Cluster service in a server cluster. The Cluster service ensures that if one node fails, a remaining node assumes the responsibilities of the failed computer, thus providing almost continuous service to Microsoft SQL Server clients. It is able to do this because the computers in the server cluster make use of a cluster storage device. For more information on the Cluster service and how it works with Network Load Balancing, see Updated technical information.
It is important to distinguish between the two cluster solutions under discussion. The first, Network Load Balancing, is intended primarily to load balance incoming TCP/IP traffic. The computers participating in this solution form one type of cluster. The second, the Cluster service, is intended primarily to provide failover service from one computer to another. The computers participating in this solution form a different type of cluster. Moreover, the Network Load Balancing cluster would most commonly be running Web server applications. In contrast, the Cluster service would most commonly be running database applications (when used in conjunction with Network Load Balancing). Network Load Balancing and the Cluster service can not both be active on the same computer, but by joining the two cluster solutions together to function in a complementary fashion, the user creates an overall clustering scheme, as shown in the following diagram:
For more information on how Network Load Balancing achieves fault tolerance and scalability, see How Network Load Balancing works.