In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Blog catalogue
I. Overview of network load balancing
Second, the cluster operation mode of NLB
Matters needing attention when using NLB clusters
IV. Deploy NLB
I. Overview of network load balancing
Network load balancing (Network Load Balancing,NLB) technology is to balance the access pressure to multiple servers, so as to improve the response ability of the whole server cluster.
1 、 NLB
Windows's network load balancing cluster allows users to propagate incoming requests to up to 32 servers, that is, up to 32 servers can be used to share external network request services, which only need to provide an IP address (or domain name). Even under heavy load, you can respond quickly, and if one or more of the servers are unavailable, the service will not be interrupted.
When network load balancing automatically detects that the server is unavailable, it can quickly reassign communication with the client in the remaining servers. This protection measure can help users provide uninterrupted services for key business programs, and the number of network load balancing servers can be increased according to the increase in network access. Network load balancing can be achieved on ordinary computers. In Windows server 2016, the applications of network load balancing include Internet Information Service (IIS), proxy server, virtual private network, terminal server, Windows Media Services (Windows video on demand, video broadcast) and other services. At the same time, network load balancing helps improve server performance and scalability to meet the growing demand from Internet clients.
2. The working principle of NLB
In an NLB cluster, each server has its own static IP address, and all servers in the NLB cluster also have a common IP address-the NLB cluster IP address.
Each server runs a single copy of the required server application, such as web, FTP, or virtual private network, and when a client initiates a request to a NLB cluster (the virtual cluster IP address of NLB), NLB distributes incoming client requests across multiple servers in the cluster. You can configure the load weight handled by each server as needed, or you can dynamically add servers to the cluster to balance cluster assistance. In addition, NLB can direct all traffic to a server called the default host.
For load-balanced applications, when the server fails or goes offline, it automatically redistributes the load between the computers that are still running and disconnects the active connection with the failed or offline server.
3. The failed servers in the NLB group guarantee cluster do not affect the existing connections.
Servers in a NLB cluster exchange detection information with each other to maintain data consistency and health of cluster membership. By default, when the server fails to send a detection message for 5 seconds, the NLB cluster assumes that the server has failed and aggregates the remaining > * servers to do the following.
Determine which servers are still active members in the cluster
Select the server with the highest priority as the new default host
Ensure that all new client requests are handled by servers that are still active; 4. Scalability of network load balancing
Scalability is a measure of how computers, services, or applications can be better improved to meet growing performance requirements. For NLB clusters, scalability refers to the ability to gradually add one or more servers to an existing cluster when the total load of the cluster exceeds its capacity. NLB can do the following.
Balance the load requests for each TCP/IP service on the NLB cluster
Supports up to 32 computers in a cluster
Balancing load requests from multiple servers in a cluster
Support for adding servers to the cluster without shutting down the cluster when the load increases
Support for removing servers from the cluster when the load is reduced
Improve performance and reduce overhead by fully pipelining. The pipeline allows requests to be sent to the NLB cluster without waiting for a response to the last sent request. 5. High availability of network load balancing
High availability can provide services reliably by minimizing downtime. NLB can automatically perform the following actions.
Detect and restore failed or offline clustered servers
Balance network load when adding or removing servers
Recover and redistribute the load within 10 seconds; 2. NLB cluster operation mode 1, unicast
NLB assigns a separate MAC address to the computers participating in the service; in response to client requests, the MAC address is called cluster MAC; unicast mode, which is more compatible with routers and switch network devices; with less use, cluster MAC addresses cannot be bundled to the port of the switch
NLB operating in unicast mode can work in all network environments, but because of its working characteristics, it has the following two limitations:
Because the cluster MAC address used by NLB is not bound to a specific switch port, all NLB traffic is broadcast on all ports on the switch, regardless of whether or not that port is connected to a NLB node, which creates an additional burden on network traffic.
Because all NLB nodes have the same MAC address, NLB nodes cannot communicate with each other through their original private IP address. 2. Multicasting
In multicast mode, NLB does not modify the MAC address of the NLB-enabled network adapter of the NLB node, but assigns it a layer 2 multicast MAC address dedicated to NLB communication, so that NLB nodes can communicate through their own private IP address.
In multicast mode, ARP replies sent by NLB nodes to cluster IP addresses, MAC addresses, and ARP requests map cluster IP addresses to multicast MAC addresses, a behavior that many routers or switches reject. It is widely used.
3. IGMP Multicast
NLB network load balancing will monitor the data packets sent to NLB nodes; the data of NLB nodes will be aggregated to the switch connected to the server; the switch will generate traffic floods, switch failure NLB fault stability is poor; use is relatively small.
Matters needing attention when using NLB clusters
Properly protect network load balancing hosts and load balanced applications.
If possible, use at least two network adapters on each cluster host, but it is not necessary.
Set the unicast or multicast mode of the network card correctly.
Use only the TCP/IP protocol on the cluster adapter.
Do not add protocols other than the TCP/IP protocol to a network card that has network load balancing enabled.
Ensure that all hosts in the cluster belong to the same subnet and that clients can access the subnet. The private IP address or cluster IP address of the cluster host should all belong to the same subnet.
Use the Network load balancing Manager to configure the NLB cluster.
You do not need to enable the network load balancing remote control option. There may be security risks in remote control of network load balancing, including data tampering, denial of service, information disclosure and so on.
Enable logging.
Use NLB clustering and failover clustering separately. 4. Deploy NLB1, and the case environment is as follows:
2. Environmental analysis:
Two network cards need to be installed on each node of the NLB cluster, which are used for external services and internal communication of the cluster. In this case, two network cards (VMnet2 and VMnet3) are installed on both servers prepared for the NLB cluster. VMnet2 is intra-cluster communication and VMnet3 is external service.
In addition to preparing the address of the cluster node, you need to plan the IP address and domain name of the cluster, and add the host record of the cluster domain name on the DNS server to ensure that users can access the cluster correctly. In this case, the cluster domain name is the www.benet.com IP address 192.168.100.254ax 24.
The NLB cluster of Windows server 2016 can be built in either a workgroup environment or a domain environment. In this case, a workgroup environment is used.
3. Start deployment:
The DC3_node1 configuration is as follows:
Add two networks to DC3_node1, and then turn it on.
VMnet2 configure intra-cluster communication IP address (I changed the name of private,VMnet3 to public in order to distinguish the name of VMnet2)
VMnet3 configuration external service IP address and DNS
Open the server manager interface, click the manage button, and then click the add roles and Features button
Keep the default next step.
Keep the default next step.
Keep the default next step.
Select the Web Server check box, then click add Features, and click next
Default next step
Default next step
Default next step
After confirming the correctness, click install
Installation completed
Add the web root directory, D disk to create a folder, enter the folder to create a text document (notepad) and write to www.node1.composer folders! Then save it as index.html.
Configure the WEB service after the web root directory has been created
Disable the default zha site. Don't delete it, just stop it.
Add site
Here, I will name the site WEB. The physical path is to browse the location where the web root directory was created, connect to a specific user, log in with a local administrator, and then test it.
Add a hostname
At this point, the web site has been deployed, and the NLB is deployed.
The D4_node2 configuration is as follows:
The configuration is basically the same as the configuration of the first server, and two network cards are also added. IP address of VMnet2: 172.16.1.2 IP address of 24 VMnet3: 192.168.100.20 DNS:192.168.100.30
Add a WEB server, create a web root directory, the actual environment WEB root directory content is the same, I see the effect here this server root directory content to write www.node2.compose directory! The effect can be seen by the aspect client access. (I will not screenshot self-configuration, do not understand the above step-by-step configuration.) configure the WEB server and register a new site are the same as the above configuration, self-configuration!
The DC5_DNS configuration is as follows:
There is basically no brain in front of me. I will not take a screenshot in the next step. I will configure it by myself. I will cut the point and add a DNS server.
Default next step
Default next step
Install DNS
Start configuring DNS server
Create a new host
The IP address is the cluster address.
If the client accesses it in a moment, just use the browser to access www.benet.com.
The basic environment has been deployed, only the network load balancing is left, and the client can finally configure IP address access.
Start configuring NLB node 1 (that is, DC3_node1):
By default, I will not take screenshots one by one by default. If I don't understand the screenshot above, I will start adding network load balancing directly here.
Start installation
Installation completed
Start configuring network load balancing
Create a new cluster
Enter the IP address of the external service of the computer in node 1, click the "Connect" button, and then follow the next step after the connection is successful.
Default next step
Add cluster IP address
Add Internet name, operation mode of my choice of multicast
Click Edit to modify the port number and the protocol. I won't change it here. You can modify it if you need it.
NLB Node 1 configuration is complete, start configuring NLB Node 2
NLB Node 2 is configured as follows (D4_node2):
Install the network load balancing service by yourself. I don't understand how node 1 is installed, so I'll start to configure it directly.
Node 2 does not need to create a new cluster, but directly connects to the existing node 1, which is just configured.
You need to wait about 2-3 minutes for the connection here. Just be patient.
After connecting to the sha, add hosts to the cluster
Enter the local IP address to connect
Default next step
Just click finish.
The priority of the following two servers is not the same. The client will automatically switch to the next server after accessing a high-priority and high-priority failure.
At this point, the configuration of NLB is complete. NLB can have up to 32 nodes. I will simulate two nodes here to see the effect. The configuration is the same. Let's configure client access verification.
Win 7 is configured as follows:
For normal access, it is the server with high priority
Simulate the failure of the high priority server, (the server shuts down), and then visit again will find that it automatically switches to the server with priority 1
-this is the end of this article. Thank you for reading-
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.