Windows Server R2 load Balancing Getting Started

Source: Internet
Author: User
Tags failover dedicated ip

First, the simple introduction of load balancing

Load balancing, also known as load sharing, refers to load balancing by dynamically adjusting the load on the system, and performing the load on multiple operational nodes to reduce the impact of unbalanced load on the system, thus improving the efficiency of the system.
There are load balancing components in commonly used large server systems, such as Microsoft's Network Load Balancing NLB, Oracle RAC, Cisco's Load Balancer (SLB), Apach+tomcat load balancing, which can load balance the various nodes of the system from different aspects of hardware or software. , effectively improve the operation efficiency of large-scale server system, thus improve the system throughput. This article takes Microsoft's Network Load Balancing NAT as an example to briefly describe how Windows Server R2 load Balancing is installed and used.
In Windows Server R2, there is a "Network Load Balancing" feature (for short, NLB, Network Load Balancing), which is a TCP/IP-based service that maps a registered IP address to the IP addresses of multiple internal domains, allowing Multiple hosts respond to network requests at the same time. With NLB, Network Load Balancing can be connected to up to 32 hosts, allowing 32 hosts to share a large amount of service pressure. In Windows Server R2, there is also a failover clustering feature that uses load sharing to persist the shared information of multiple servers, and when a problem occurs in one of the servers, the request is automatically distributed among the other servers. The use of "failover clustering" function, can guarantee the normal operation of "Network Load Balancing cluster", it is advantageous to manage all kinds of resources in the distributed system, utilize the shared information and its service mechanism to enlarge the processing capacity of the system.

Ii. main functions of NLB

    1. Supports cluster functionality, and a cluster supports up to 32 servers.
    2. Support for network address translation (NAT), which can automatically forward requests to the NLB cluster on each server.
    3. Enables pipelined management, allowing multiple requests to be sent to an NLB cluster at the same time.
    4. Support multi-address multiport management, each server can bind multiple virtual IP, each virtual IP can establish multiple open ports.
    5. Supports fail-fast recovery, which automatically recovers the cluster online when a server fails to restart.
    6. Support for unicast, multicast, IGMP multicast multiple cluster operation modes.
    7. Support Event log management to quickly review cluster event records.

Iii. how NLB is used

3.1. Open the Service Manager and add the Network Load Balancing feature.

3.2. After the installation is complete, open the Network Load Balancing Manager

3.3. Create a new cluster and connect to a host as a cluster server

3.4. For this host binding priority progression, and dedicated IP address, a host can bind multiple IP addresses

3.5. Set up the cluster IP address for load balancing, if there are multiple IP addresses the system will detect the information with the first IP as the IP of the cluster.

3.6. Set the cluster parameters, where you can set the cluster's full Internet name to determine its operating mode. A little explanation is needed here:

3.6.1 Unicast mode
Refers to the host node to the same virtual MAC address, in which case communication between the nodes is not possible.

3.6.2 multicast mode
means that each host node retains its original MAC address, plus the communication MAC address that is dedicated to NLB, so that communication between nodes can be achieved normally. However, not all routers or switches support multicast mode and need to be handled with care.

3.6.3 IGMP multicast mode
Based on the multicast mode feature, IGMP messages are sent every 60 seconds by default. It ensures that the traffic sent to the Network Load Balancing cluster is routed only through the ports that serve the cluster hosts, not all switch ports.

Note : Since not all routers or switches support multicast mode, it is best to use dual-NIC unicast mode in case of uncertainty, and to pre-set ARP, which could cause cross-network segments to fail to access the cluster IP error.

3.7 Bind the cluster's open ports, where you can set up a range of open ports for the host. Placed in TCP, UDP protocol is not much to explain, general settings only use the TCP protocol to make data transmission more reliable and security. Here is a little explanation of the sieve-first mode:

3.7.1 Multi-Host
This parameter specifies that multiple hosts in the cluster handle the network traffic associated with the port rule. This filtering mode provides scalable performance and fault tolerance by distributing network load across multiple hosts. You can specify that the load is distributed evenly between hosts, or that each host processes the specified amount of load. In the multi-host affinity option, there are 3 options:

    • None Option: Specifies that multiple connections from the same client IP address can be handled by different hosts (no client affinity). The first request may point to host A, the second request may point to Host B, and in order to share the session between multiple hosts, the system should pre-persist the session. If you are developing using ASP, you can use the command:
      Aspnet_regsql.exe-s〈sql Server ip>-u〈user name>-p〈password>-e-ssadd-sstype c-d〈database Name>
      Create a database for session persistence save
    • Single option: Specifies that Network Load Balancing should direct multiple requests from the same client IP address to the same cluster host. This is the default setting for similarity.
    • Network Options : refers to similarity specifies that Network Load Balancing directs multiple requests from the same TCP/IP class C address range to the same cluster host. For example, when a client uses multiple proxy servers to access a cluster, the request looks like it originated from a different computer. Enable the network affinity option to correctly handle session data for multiple proxy servers on the same client.

3.7.2 Single Host
This parameter specifies that a single host in the cluster handles network traffic for the associated port rule according to the specified processing priority. This filtering mode provides port-specific fault-tolerant performance for processing network traffic.

3.7.3 Disabling this port range
This parameter specifies all network traffic that blocks the associated port rule. In this case, the Network Load Balancing driver will filter all the corresponding network packets or datagrams. This filtering mode allows you to block network traffic that is routed to a specific range of ports.

3.8 After completing the cluster configuration, right-click on the cluster, select "Add Host to Cluster", repeat the 3.3, 3.4 installation steps to connect multiple cluster hosts.

Four, Network Load Balancing cluster system test

Create an ASP. NET project, add the following Default.aspx page, and then build a cluster with a binding IP of 192.168.1.110, when editing port rules, select the multi-host no affinity filter mode. Finally, VIRTUAL-PC-A1, VIRTUAL-PC-A2 Two hosts were added to the cluster. When accessed using a third-party client, multiple clicks on the NewPage connection can detect that the system will connect the request to a different host.

1 

Test results

Five, NLB installation considerations

5.1. If you need to use the domain service, you typically add the Active Directory Domain Services role and the forest, domain configuration before you install the Network Load Balancing Manager.


If the server requires IIS or ASP. NET, then it is recommended that you add the Web server (IIS) server role and the. NET Framework 3.5 features before installing NLB


5.2. To establish a Network Load Balancing cluster, you need to first turn on the Enable Network Discovery feature in advanced sharing settings.

If you cannot turn on the Enable Network Discovery feature, you can first open the following 3 services in Service Manager:

    • Function Discovery Resource Publication
    • SSDP Discovery
    • UPnP Device Host


5.3. When using virtualization tools such as VMware and Hyper-V, you cannot find other virtual hosts when sharing information in the network, you can try to check the virtual machine settings when the network adapter uses the same network connection mode, and the network shared Services feature is turned on.


5.4. When you establish a cluster in Network Load Balancing Manager, the cluster connects to the host with an error message such as "The RPC connection server is not available" and you can try to check whether the host has open remote Procedure call (RPC) and remote Procedure Call (RPC) Locator service, and check that the "Remote Procedure call (RPC) properties-dependencies-dependent services" status is all set to "started" or "Startup Type" set to "automatic".


5.5. If you use the Virtualization tool to clone a host, when the cluster connects to the host, "Specify that the host does not have any interfaces to install a new cluster", which may be caused by multiple hosts using the same Mac when cloning the host, you can try uninstalling the driver for the network adapter before you drive the software update.


5.6. When the cluster connects to the host, an error message appears "NLB Manager on Host ' MyPC ' cannot continue because Microsoft Cluster Service is not installed." You can check that the Network Load Balancing Service has been successfully installed on the server, and then open Local Area Connection-properties and select Network Load Balancing (NLB).

Windows Server R2 load Balancing Getting Started

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.