Web Farm NLB Cluster for IIS Web Server

  
        

The steps to create a Windows NLB cluster are as follows:

1. Install the network load balancing function on Web1 and Web2 respectively: [Click the server manager &rarr in the lower left corner; add the function → select the network load as shown below Balance]


2. Select [Start & Rarr; Management Tools & Rarr; Network Load Balancing Manager & Rarr on Web1; as shown in the figure, select Network Load Balancing Cluster, right click → New Cluster] .


3. Enter the computer name (also IP) of the first server to be added to the cluster at the host as shown below. Click Connect, then select Web1 from the bottom of the interface to enable it. After the NLB NIC, click Next to select the NIC of Network 1 according to the topology requirements.


4. Click the next step as shown below. The priority (single host identifier) ​​in the figure is the host ID of Web1 (the host ID of each server must be Uniquely, if the packet received by the cluster is not defined in the port rule, it will be handed over to the server with higher priority (shorter host ID), you can also use this interface. Add multiple IP addresses to this NIC.


5. Click Add, set the cluster IP address (such as 192.168.1.254) and subnet mask (255.255.255.0) as shown below and click OK.


6. Back to the new cluster: Click Next when you are in the cluster IP address interface. You can also add multiple cluster IP addresses here.

7. Click Next as shown below. In the cluster operation mode in the figure, we choose unicast mode.


Tip:

You can also choose multicast or IGMP multicast. If IGMP multicast is selected, each server in the cluster will send IGMP joins periodically. After receiving this information, the IGMP Snooping-enabled switch can know which port the cluster servers belonging to the same multicast group are connected to, so that Switch Flooding can be restricted to these ports.

8. Click Finish as shown below to adopt the default port rules.


9. After the setting is completed, it will enter the convergence program. After a while, the program will be completed, and the status column in the following figure will be changed to aggregated.


10, then add Web2 to the NLB cluster, as shown below [right click on the cluster IP address 192.168.1.254 → add host to the cluster → enter the server name at the host Then click Connect → from the bottom of the interface, select the network card in which you want to enable NLB in Web2 and click Next (we choose to connect to the network card of network 1 in the figure).

Note:

You must first close the Windows Firewall of Web2, or open the file and printer sharing, otherwise the Windows Firewall will block and cannot resolve to the IP address of Web2. If you do not want to change the Windows Firewall, please enter the IP address of Web2 directly.


11. Click Next as shown below, the priority (single host identifier) ​​is 2, that is, the host ID is 2.


12, as shown below, click Finish.


13. After the setting is completed, the program will be merged. The status column in WEB2 will be changed to aggregated.


After completing the above settings, you can use the browser to test whether you can connect to the Web Farm website. This time we will connect via www.itchenyi.com as shown below. The IP address recorded in the DNS server is the cluster IP address 192.168.1.254, so the Web Farm is connected through the NLB cluster.


Tip:

You can still use the following method to further test NLB and Web Farm functions: Shut down Web1, but keep Web2 booted. Then test if you can connect to the Web Farm; after the completion, change to Web2 shutdown, but keep Web1 boot, and then test whether you can connect to Web Farm. In order to avoid the IE cache interference test, the cache file is deleted before each test.

Advanced Management for Windows NLB Clusters

If you want to change the cluster settings, for example, add a host to the cluster, delete the cluster, right click as shown below.

Here is a further explanation of the port rules:


1. Cluster IP address: Here you can select the cluster IP address to which this port rule applies. This rule is applied only when the NLB cluster is connected through this IP address. If all are selected here, all cluster IP addresses are applicable to this rule, in which case this rule is called a generic port rule. If you add other port rules yourself and their set universal port rules conflict, the rules you add take precedence.

2, port range: The port range covered by this port rule, the default is all ports.

3. Protocol: By default, both TCP and UDP are included.

4, filter mode

· multiple hosts: all servers in the cluster will handle the network traffic into the cluster, that is, to provide network load balancing and troubleshooting functions, and similar Sexual settings are responsible for handing over requests to a server within the cluster. For the ports covered by this rule, the burden ratio of each server in the cluster is the same by default. To change the burden ratio of a single server, [right click on the server → host attribute → port Rule label → select port rule → click edit → in the following figure, first cancel the equality, then adjust the relative ratio through the load. For example, if there are 3 servers in the cluster with load values ​​of 50, 100, and 150, respectively, the burden ratio is 1:2:3.


· Single Host: Indicates that traffic related to this rule will be handled by a single server, which is a server with a higher handling priority. The processing priority is set by default according to the host ID (the number is smaller and the priority is higher). You can change the server's processing priority value

· disable this port range: then all traffic related to this port rule will be blocked by the NLB cluster.

You can start (start), stop, stop, suspend, suspend, and continue the service of the server by right-clicking on the server and controlling the host as shown in the figure below. Stopping will stop processing new network traffic requests, but requests currently being processed will not be stopped.


You can enable, disable or expel the port rules by right-clicking → control port → select port rules in the following figure. The disable means that this server no longer processes network traffic related to this rule, including requests being processed; and drain will only stop processing new network traffic requests, but the request currently being processed will not be stop.


Tip:

You can also use the NLB.EXE program to perform the above management tasks.

This article comes from “IT Chen Yi” blog, please be sure to keep this source http://itchenyi.blog.51cto.com/4745638/1131911

Copyright © Windows knowledge All Rights Reserved