A brief introduction of load Balancing
Load balancing is also called load sharing, it refers to load balancing means that by dynamically adjusting the load of the system, the load is distributed to multiple operation nodes to reduce the effect of the load unbalance of each node in the system, so as to improve the efficiency of the system.
Load-balancing components are commonly found in commonly used large server systems, such as Microsoft's Network Load Balancing NLB, Oracle RAC Oracle, Cisco load Balancing (SLB), Apach+tomcat load balancing, and the ability to load balance the system's nodes from different aspects of hardware or software , it can improve the operation efficiency of the large server system and improve the throughput of the system. This article takes Microsoft's Network Load Balancing NAT as an example to briefly describe the installation and usage of load balancing for Windows Server 2008 R2.
In Windows Server 2008 R2, there is the Network Load Balancing feature (NLB, Network Load Balancing), a TCP/IP based service that maps a registered IP address to the IP address of multiple internal domains, allowing Multiple hosts respond to network requests at the same time. Using NLB Network Load Balancing can be connected to up to 32 hosts, allowing 32 hosts to share a large amount of service pressure. The Failover Clustering feature is also available in Windows Server 2008 R2, which uses load sharing to persist shared information for multiple servers, and when a problem occurs on one of the servers, the request is automatically allocated to other servers. By using the Failover Clustering feature, the Network Load Balancing cluster can be ensured to operate properly, which is advantageous to manage all kinds of resources in the distributed system, and use the shared information and its service mechanism to enlarge the processing ability of the system. The failover clustering feature will be described in more detail in the next article.
Ii. main functions of NLB
Supports clustering, with a cluster that supports up to 32 servers. Support for network address translation (NAT) functionality to automatically forward requests to the NLB cluster on each server. Implement piped management, allowing multiple requests to be sent to the NLB cluster at the same time. Multi-address multiport management is supported, each server can bind multiple virtual IP, each virtual IP can establish multiple open ports. Support for fast fault recovery and automatic recovery of cluster online when a server fails to reboot. Support for unicast, multicast, IGMP multicast multiple cluster operation modes. Supports event log management to quickly review cluster event records.
NLB Installation
Iii. the way of using NLB
3.1. Open the Service Manager and add the Network Load Balancing feature.
3.2. When 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 series, and dedicated IP address, a host can bind multiple IP addresses
3.5. Set up a cluster IP address for load balancing, if there are multiple IP address systems will be the first IP as the cluster's IP to detect information.
3.6. Set the cluster parameters, where you can set the full Internet name of the cluster and determine its operating mode. A little explanation is needed here:
3.6.1 Unicast mode
Refers to the host nodes to point to the same virtual MAC address, in this case, communication between the nodes can not be implemented.
3.6.2 multicast mode
means that each host node retains the original MAC address, in addition to the special for NLB communication MAC address, so that the normal communication between the nodes. However, not all routers or switches support multicast mode and need to be handled with caution.
3.6.3 IGMP multicast mode
Based on multicast mode functionality, IGMP information is sent every 60 seconds by default. It ensures that traffic sent to the Network Load Balancing cluster is delivered only through the ports that serve the cluster host, not all switch ports.
Note: because not all routers or switches support multicast mode, it is best to use dual network card unicast mode in the case of uncertainty, and to set ARP in advance, which may cause the cluster IP error to be inaccessible across the network segment.
3.7 Bound cluster open ports, where you can set up a range of open ports for the host. The TCP and UDP protocols are not interpreted much, and general settings use only the TCP protocol to make data transfer more reliable and secure. Here is a little explanation of the pattern of the sieve first:
3.7. More than 1 hosts
This parameter specifies that multiple hosts in the cluster handle the network traffic associated with the port rule. This filtering pattern provides scalable performance and fault tolerance by distributing network load across multiple hosts. You can specify that the load is evenly distributed between hosts, or that each host handles the specified load. Among the multiple host similarity options, there are 3 choices:
1, "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, in order to achieve a shared session between multiple hosts, the system should be in advance session to be persisted. If you are using ASP.net for development, you can use the command:
Aspnet_regsql.exe-s〈sql Server ip>-u〈user name>-p〈password>-e-ssadd-sstype c-d〈database Name>
Establish a database for session persistence save
2, "single" option: Specifies that Network Load Balancing should be directed to multiple requests from the same client IP address to the same cluster host. This is the default setting for similarity.
3, "network" option: Refers to the similarity specifies that Network Load Balancing directs multiple requests from the same TCP/IP C-class 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 sessions 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 handling network traffic.
3.7.3 Disable this port range
This parameter specifies all network traffic that blocks the related port rule. In this case, the Network Load Balancing driver filters all appropriate 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, press the right key on the cluster, select "Add Host to Cluster", repeat the 3.3, 3.4 installation steps, and connect to multiple cluster hosts.
Iv. Network Load Balancing cluster system test
Create a ASP.net project, add the following Default.aspx page, and then set up a cluster, bind IP to 192.168.1.110, and when you edit port rules, select the multiple host no dependencies filter mode. Finally, VIRTUAL-PC-A1, VIRTUAL-PC-A2 Two hosts were added to the cluster. When using a third party client for access, multiple clicks on the NewPage connection can detect that the system will connect the request to a different host.
Test results
V. NLB Installation Considerations
5.1. If you need to use the domain service, you typically add the Active Directory Domain Services role and forest, domain configuration before installing the Network Load Balancing Manager.
If the server needs to use IIS or asp.net, 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 PUBLICATIONSSDP Discovery UPnP Device Host
5.3. If you are using virtualization tools such as VMware, Hyper-V, and you cannot find other virtual hosts when you implement information sharing on your network, you can try to check whether the network adapter uses the same "network connection" feature on the virtual machine settings, and the network share service is turned on.
5.4. To establish a cluster in Network Load Balancing Manager, and to display an error message such as "RPC connection server is unavailable" when the cluster is connected to the host, try checking to see if the host has turned on remote Procedure call (RPC) and remote Procedure Call (RPC) Locator service and check that the status of the Remote Procedure call (RPC) properties-dependencies-dependent services has all been set to started or startup type is set to Automatic.
5.5. If you use a virtualization tool to clone a host, when a cluster is connected to a host and the "specified host does not have any interfaces to install the new cluster", which may be caused by multiple hosts using the same Mac when the host is cloned, you can try uninstalling the network adapter driver and then driving the software update.
5.6. If an error is displayed while the cluster is connected to the host, "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).
Conclusion
To meet the internal needs of large enterprises, the implementation of Enterprise Server High-performance, high availability, high reliability, the major software and hardware providers to build a series of solutions, and Microsoft's Network Load Balancing (NLB) is only one of them. However, given my limited knowledge and not being an expert in network services management, this article only involves the knowledge of NLB starter installation.
See TechNet Library http://technet.microsoft.com/zh-cn/library/cc778263.aspx for more information
The errors and loopholes in the article please comment.
Friends who are interested in. NET development Welcome to join QQ Group: 230564952 to discuss together!