Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to get started with load balancing in Windows Server 2008 R2

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Today, I'll talk to you about how to get started with Windows Server 2008 R2 load balancing. maybe many people don't know much about it. In order to make you understand better, the editor summarizes the following contents. I hope you can get something from this article.

First, a brief introduction to load balancing

Load balancing, also known as load sharing, refers to load balancing, which means that load balancing is carried out among multiple operating nodes by dynamically adjusting the load of the system, so as to reduce the impact caused by the unbalanced load of each node in the system. in order to improve 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's Oracle RAC, Cisco's load balancing (SLB), Apach+Tomcat load balancing. They can achieve load balancing of each node of the system from different aspects of hardware or software, effectively improve the running efficiency of the large server system, and thus improve the throughput of the system.

The following is an example of Microsoft's network load balancing NAT to briefly introduce the installation and use of Windows Server 2008 R2 load balancing. In Windows Server 2008 R2, there is a "network load balancing" function (NLB, Network Load Balancing), which is a TCP/IP-based service that maps a registered IP address to the IP address of multiple internal domains, allowing multiple hosts to respond to network requests at the same time. Using NLB network load balancer, you can connect up to 32 hosts, allowing 32 hosts to share a lot of service pressure. There is also a "failover clustering" function in Windows Server 2008 R2, which uses load sharing to persist the common information of multiple servers. When there is a problem with one of the servers, the request will be automatically allocated to other servers. The use of the "failover cluster" function can better ensure the normal operation of the "network load balancing cluster", help to manage all kinds of resources in the distributed system, and use the shared information and its service mechanism to expand the processing capacity of the system.

II. Main functions of NLB

The clustering feature is supported, and a cluster supports up to 32 servers.

Support network address translation (NAT) function, can automatically forward requests to each server on the NLB cluster.

Implement pipelined management that allows multiple requests to be sent to the NLB cluster at the same time.

Support multi-address and multi-port management, each server can bind multiple virtual IP, each virtual IP can establish multiple open ports.

Support rapid failure recovery function, when the server failure restart will automatically restore the cluster online.

Support unicast, multicast, IGMP multicasting multiple cluster operation modes.

Event log management is supported, and cluster event records can be quickly reviewed.

III. Mode of use of NLB

3.1. Open the Service Manager and add the Network load balancing function.

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 one of the cluster servers

3.4. This host is bound with priority, and a dedicated IP address. A host can bind multiple IP addresses.

3.5. A cluster IP address is established for load balancing. If there is more than one IP address system, the information will be detected with * IP as the IP of this cluster.

3.6. Set the cluster parameters, where you can set the full Internet name of the cluster and determine its mode of operation. A little explanation is needed here:

3.6.1 unicast mode means that each host node is redirected to the same virtual MAC address, in which case the nodes cannot communicate with each other.

3.6.2 Multicast mode means that each host node retains the original MAC address, in addition to the communication MAC address dedicated to NLB, so that the nodes can communicate normally. However, not all routers or switches support multicast mode and need to be handled with caution.

3.6.3 IGMP Multicast mode is based on the Multicast mode function, which sends IGMP messages every 60 seconds by default. It ensures that traffic to the network load balancing cluster is sent only through the ports that serve the cluster host, not all switch ports.

Note: since not all routers or switches support multicast mode, * use dual Nic unicast mode under uncertain circumstances, and set ARP in advance, otherwise it may cause an error that cluster ip cannot be accessed across network segments.

3.7 bind the open ports of the cluster, where you can set open ports within a certain range for the host. There is no much explanation for TCP and UDP protocols. Generally, only TCP protocol is used to make data transmission more reliable and secure. Here is a brief explanation of the screening mode:

3.7.1 Multi-hosts this parameter specifies that multiple hosts in the cluster handle network traffic related to port rules. This filtering mode provides scalable performance and fault tolerance by distributing network load among multiple hosts. You can specify that the load is evenly distributed between hosts, or each host handles a specified amount of load. Among the multi-host similarity options, there are three options:

None option: specifies that multiple connections from the same client IP address can be handled by different hosts (no client similarity). * the second request may be directed to CVM An and the second request may be directed to CVM B. in order to share session among multiple hosts, the system should persist the session in advance. If you use 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 > to establish a database for Session persistence.

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 option: 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 the client uses multiple proxy servers to access the cluster, the request appears to originate from different computers. Enable the Network similarity option to correctly handle session 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 the network traffic of the relevant port rules according to the specified processing priority. The filtering mode provides port-specific fault tolerance for dealing with network traffic.

3.7.3 disable the port range this parameter specifies to block all network traffic for the relevant port rules. In this case, the network load balancing driver will filter all corresponding network packets or datagrams. This filtering mode allows you to block network traffic to a specific range of ports.

3.8 after completing the cluster configuration, right-click on the cluster and select "add Host to Cluster". Repeat the 3.3 and 3.4 installation steps to connect multiple cluster hosts.

IV. Testing of network load balancing cluster system

Create an ASP.NET project, add the following Default.aspx page, and then set up a cluster with a binding IP of 192.168.1.110. When editing the Port rules, select the "multi-host unrelated" filter mode. * join two hosts, Virtual-PC-A1 and Virtual-PC-A2, respectively in the cluster. When using a third-party client for access, you can detect that the system will connect the request to a different host when you click on the NewPage connection multiple times.

Protected void Page_Load (object sender, EventArgs e) {String hostName = System.Net.Dns.GetHostName (); Response.Write (hostName+ ""); IPAddress [] addressList = System.Net.Dns.GetHostAddresses (hostName); foreach (IPAddress address in addressList) Response.Write (address.ToString () + ");} New Page

Test result

Matters needing attention in NLB installation

5.1. If you need to use "domain" services, generally add the "Active Directory domain services" role and configure the forest and domain before installing the "network load balancing" manager.

If the server needs to use IIS or ASP.NET, it is recommended to add the Web server (IIS) server role and .NET Framework 3.5 features before installing NLB

5.2. To establish a Network load balancing Cluster, you need to 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. If you can't find other virtual hosts when you use VMware, Hyper-V and other virtualization tools to achieve information sharing in the network, you can try to check whether the "network adapter" uses the same "network connection mode" when setting up the virtual machine, and the "network sharing service" function has been turned on.

5.4. Set up a cluster in the "Network load balancing Manager" and display an error message such as "RPC connection server is not available" when the cluster connects to the host. Try to check whether the host has opened the "Remote Procedure Call (RPC)" and "Remote Procedure Call (RPC) Locator" services. And check whether the "status" of "Remote Procedure Call (RPC) properties-dependency-dependent services" has all been set to "started" or "startup type" is set to "automatic".

5.5. If you use the virtualization tool to clone a host and display "the specified host does not have any interfaces available to install the new cluster" when the cluster connects to the host, this may be due to the fact that multiple hosts are using the same MAC when cloning the host, and you can try to uninstall the driver for the network adapter before making the driver software update.

5.6. If an error appears when the cluster connects to the host, "NLB Manager on the host 'MyPC' cannot continue because the Microsoft Cluster Service is not installed." You can check whether the Network load balancing service has been successfully installed on the server, then open Local connections-Properties, and select Network load balancing (NLB).

In order to meet the internal needs of large enterprises and achieve high performance, high availability and high reliability of enterprise servers, major software and hardware providers have built a series of solutions, and Microsoft's Network load balancing (NLB) is only one of them.

After reading the above, do you have any further understanding of how to get started with Windows Server 2008 R2 load balancing? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report