Configure Network Load Balancing in Windows Server 2019
In this article, we will see the steps to the Network Load Balancing (NLB) feature in Windows Server 2019. We can use NLB to manage two or more servers as a single virtual cluster.
What is NLB (Network Load Balancing) in Windows Server 2019?
The Network Load Balancing (NLB) distributes traffic across several servers by using the TCP/IP networking protocol. By combining two or more computers that are running applications into a single virtual cluster, NLB provides reliability and performance for web servers and other mission-critical servers.
Windows Server 2019 NLB cluster can support up to 32 Servers in a single NLB cluster. The servers in an NLB cluster are called hosts, and each host runs a separate copy of the server applications.
NLB distributes incoming client requests across the hosts in the cluster. You can configure the load that is to be handled by each host.
Understanding Test lab:
For this, we will use the virtual test lab created in VirtualBox.
- WS2K19-DC01: Domain Controller and DNS
- WS2K19-SRV02: Member Server
- WS2K19-SRV03: Member Server
Install the Network Load Balancing feature on Server 2019:
Note: We need to perform the following steps on both member servers that are going to participate in the NLB cluster.
1. On Member Server, open Server Manager. Click on Tools and select Add Role and Features.
2. On the Before you begin page, click Next.
3. Select Role-based or feature-based installation and click Next.
4. Select a server from the server pool on which you want to install the Network Load Balancing feature, click Next.
5. On select server roles page, click Next.
6. On select features, select Network Local Balancing checkbox.
7. A new window will pop up, click on Add Features to include required features and management tools for Network Local Balancing work properly.
8. Make sure that NLB feature is selected. Click Next.
9. Click on the Install button to start the installation process.
10. Click on Close.
Reminder: We need to perform the same steps to install the NLB feature on the WS2K19-SRV03 member server.
After installing the NLB feature, the next step is to create the NLB cluster using windows server 2019. To perform these steps, we need to open the Network Load Balancing Manager on one of the NLB nodes.
Configure NLB Cluster in Windows Server 2019:
11. On the Server Manager console of the WS2K19-SRV02 member server, click Tools and select Network Load Balancing Manager.
12. Select and right-click Network Load Balancing Clusters and then click New Cluster.
13. Type the IP address or name of the second member server in the Host field and then click Connect. Verify that the Interface name is listed and then proceed to next.
14. On the New Cluster: Host Parameters page, adjust the priority value as per requirement. Also, ensure that the default status has set as Started. When you are ready, click on Next.
15. On the New Cluster: Cluster IP Addresses page, click Add to add a new Cluster IP address.
16. Specify a Cluster IP Address, and click OK.
Note: This IP address is a new NLB Cluster virtual IP address on which the host service will run.
17. If required, you can add more than one IP address by performing the same steps. Click Next.
18. Select an NLB cluster operation mode. You can also specify the FQDN name for the NLB cluster in the Full Internet name field. Click Next.
19. On the New Cluster: Port Rules page, select the existing port rule and click on edit.
20. Type port range. From 80 to 80 (As we only want port number 80 for IIS NLB cluster). Select Affinity mode to none. Click OK.
21. Click on the Add button to a new rule for port number 443 using the same steps.
22. Click on Finish.
23. Wait until the WS2K19-SRV03 node is added successfully. The Icon Color of the added NLB node should be displaying green.
Add second NLB node to an Existing NLB cluster:
24. Right-click on the existing NLB cluster and select Add Host To Cluster.
25. Type the WS2K19-SRV02 in the Host field and then click Connect. Verify that the Interface name is listed and then proceed to next.
26. On the New Cluster: Host Parameters page, adjust the priority value as per requirement. Also, ensure that the default status has set as Started. When you are ready, click on Next.
27. Click on Finish to complete the process of adding the second NLB node to an existing NLB cluster.
28. Verify that the second NLB node is added successfully. The icon color should be displaying green.
Test the NLB Configuration with Default Web Site:
Already I have installed IIS service on both member servers to test the NLB cluster. We will access the default website using the NLB cluster IP address.
29. Open a web browser. Type the NLB cluster IP address in the address bar.
Verify that you can access the Default Website. You are accessing the WS2K19-SRV03 server due to NLB priority 1.
30. Delete web browsing history and again access the NLB cluster IP address using Internet Explorer.
31. This time you are accessing the WS2K19-SRV02 server due to NLB load balancing.
Used this type of configuration when balancing traffic between two IIS servers. The port rules were handling only HTTP (port 80) and HTTPS (port 443) traffic.
That’s it for this guide on How to Install and Configure the Network Load Balancing (NLB) feature in Windows Server 2019. Thank you for reading.