How to Configure Network Load Balancing in Server 2022
Posted on 16th June 2023
Network Load Balancing (NLB) is a feature of Windows Server that allows you to distribute traffic across multiple servers. This can be useful for ensuring that your website or application is available even if one of your servers goes down. In this article, we will show you how to configure network load balancing in Windows Server 2022.
Before you begin, you will need to have a working installation of Windows Server 2022. You will also need to have at least two servers that you can use for load balancing.
1. Open the Server Manager and click on the Tools menu.
2. Select Network Load Balancing from the list of tools.
3. In the Network Load Balancing Manager, click on the New Cluster menu.
4. Enter a name for your cluster and click Next.
5. Select the Virtual IP Address that you want to use for your cluster. This should be an unused IP address. Click Next.
6. Select the type of traffic that you want to load balance. You can choose from HTTP, HTTPS, or TCP. Click Next.
7. Select the port that you want to use for your cluster. The default port is 80. Click Next.
8. Select the network adapter that you want to use for your cluster. Click Next.
9. Review your settings and click Finish.
Your cluster will now be created. You can add additional servers to your cluster by clicking on the Add button. Use tags when you want to link to something.
Related: How to Configure Network Load Balancing in Server 2019
Network Load Balancing (NLB) is a high-availability and high-performance solution that distributes traffic among multiple servers, known as hosts, in a server farm. NLB balances traffic by using a virtual IP address (VIP) that is shared by multiple hosts. When a client sends a request to the VIP, NLB directs the request to one of the hosts in the farm.
NLB is transparent to users and to the applications that run on the hosts. Users connect to the NLB-enabled application by using the VIP, and they are unaware that their request is being handled by a different host each time they connect. Similarly, the applications running on the hosts do not need to be aware that they are part of an NLB farm.
NLB provides two methods for distributing traffic among the hosts in a farm:
– Unicast: In unicast mode, each host in the farm has a unique IP address, and traffic is distributed among the hosts by using MAC address learning.
– Multicast: In multicast mode, all of the hosts in the farm share a common IP address, and traffic is distributed among the hosts by using an IP multicast address.
Note: NLB is available in all editions of Windows Server 2019.
Configure Network Load Balancing
In this section, you’ll learn how to use the NLB Manager console to configure Network Load Balancing.
To configure NLB, you’ll need to perform the following tasks:
1. Add the hosts to the farm.
2. Configure the hosts.
3. Configure the cluster.
4. Configure the port rules.
5. Configure the affinities.
6. Start the cluster.
Add the Hosts to the Farm
To add a host to the NLB farm, follow these steps:
1. Open the NLB Manager console.
2. In the console tree, expand the tree under the cluster that you want to configure.
3. Click the Hosts node.
4. In the Actions pane, click Add Host to Farm.
5. In the Add Host to Farm dialog box, click the host that you want to add, and then click Add.
6. Repeat steps 4-5 for each host that you want to add to the farm.
Configure the Hosts
After you’ve added the hosts to the farm, you’ll need to configure each host. To configure a host, follow these steps:
1. In the NLB Manager console, expand the tree under the cluster that you want to configure.
2. Click the Hosts node.
3. In the list of hosts, right-click the host that you want to configure, and then click Properties.
4. In the host’s Properties dialog box, click the General tab.
5. Enter a name and description for the host.
6. Select the appropriate radio button for the host’s priority. The priority determines which host will be used to service requests when multiple hosts are available.
7. Enter the appropriate value for the host’s weight. The weight determines how much traffic the host will receive relative to the other hosts in the farm.
8. Click the Port Rules tab.
9. In the Port Rules list, click the port rule that you want to configure.
10. In the Port Rule Properties dialog box, enter the appropriate values for the port rule.
11. Click OK.
12. Repeat steps 9-11 for each port rule that you want to configure.
13. Click the Affinity tab.
14. In the Affinity list, click the affinity that you want to configure.
15. In the Affinity Properties dialog box, enter the appropriate values for the affinity.
16. Click OK.
17. Repeat steps 14-16 for each affinity that you want to configure.
18. Click the NLB Parameters tab.
19. In the NLB Parameters list, click the parameter that you want to configure.
20. In the Parameter Properties dialog box, enter the appropriate values for the parameter.
21. Click OK.
22. Repeat steps 19-21 for each parameter that you want to configure.
23. Click the Unicast Parameters tab.
24. In the Unicast Parameters list, click the parameter that you want to configure.
25. In the Parameter Properties dialog box, enter the appropriate values for the parameter.
26. Click OK.
27. Repeat steps 24-26 for each parameter that you want to configure.
28. Click the Multicast Parameters tab.
29. In the Multicast Parameters list, click the parameter that you want to configure.
30. In the Parameter Properties dialog box, enter the appropriate values for the parameter.
31. Click OK.
32. Repeat steps 29-31 for each parameter that you want to configure.
33. Click OK.
Configure the Cluster
After you’ve configured the hosts, you’ll need to configure the cluster. To configure the cluster, follow these steps:
1. In the NLB Manager console, expand the tree under the cluster that you want to configure.
2. Click the Cluster node.
3. In the Actions pane, click Properties.
4. In the Cluster Properties dialog box, click the General tab.
5. Enter a name and description for the cluster.
6. Select the appropriate radio button for the cluster’s priority. The priority determines which cluster will be used to service requests when multiple clusters are available.
7. Enter the appropriate value for the cluster’s weight. The weight determines how much traffic the cluster will receive relative to the other clusters in the farm.
8. Click the Port Rules tab.
9. In the Port Rules list, click the port rule that you want to configure.
10. In the Port Rule Properties dialog box, enter the appropriate values for the port rule.
11. Click OK.
12. Repeat steps 9-11 for each port rule that you want to configure.
13. Click the Affinity tab.
14. In the Affinity list, click the affinity that you want to configure.
15. In the Affinity Properties dialog box, enter the appropriate values for the affinity.
16. Click OK.
17. Repeat steps 14-16 for each affinity that you want to configure.
18. Click the NLB Parameters tab.
19. In the NLB Parameters list, click the parameter that you want to configure.
20. In the Parameter Properties dialog box, enter the appropriate values for the parameter.
21. Click OK.
22. Repeat steps 19-21 for each parameter that you want to configure.
23. Click the Unicast Parameters tab.
24. In the Unicast Parameters list, click the parameter that you want to configure.
25. In the Parameter Properties dialog box, enter the appropriate values for the parameter.
26. Click OK.
27. Repeat steps 24-26 for each parameter that you want to configure.
28. Click the Multicast Parameters tab.
29. In the Multicast Parameters list, click the parameter that you want to configure.
30. In the Parameter Properties dialog box, enter the appropriate values for the parameter.
31. Click OK.
32. Repeat steps 29-31 for each parameter that you want to configure.
33. Click OK.
Configure the Port Rules
After you’ve configured the hosts and the cluster, you’ll need to configure the port rules. Port rules determine which traffic will be distributed by NLB. To configure a port rule, follow these steps:
1. In the NLB Manager console, expand the tree under the cluster that you want to configure.
2. Click the Port Rules node.
3. In the Actions pane, click Add Port Rule.
4. In the Add Port Rule dialog box, enter the appropriate values for the port rule.
5. Click OK.
6. Repeat steps 3-5 for each port rule that you want to configure.
Configure the Affinities
After you’ve configured the port rules, you’ll need to configure the affinities. Affinities determine how traffic will be distributed among the hosts in a farm. To configure an affinity, follow these steps:
1. In the NLB Manager console, expand the tree under the cluster that you want to configure.
2. Click the Affinity node.
3. In the Actions pane, click Add Affinity.
4. In the Add Affinity dialog box, enter the appropriate values for the affinity.
5. Click OK.
6. Repeat steps 3-5 for each affinity that you want to configure.
Start the Cluster
After you’ve configured the hosts, the cluster, the port rules, and the affinities, you’ll need to start the cluster. To start the cluster, follow these steps: