Windows layer Fourth load balancing--based on NLB load balancing

Source: Internet
Author: User
Tags node server

There is an article on Windows Seventh load balancing, this time about the fourth layer load balancer

The TCP/IP protocol family, the seventh layer is the application layer, and the fourth layer is the transport layer. The fourth tier load balancing is mainly converted via IP.

Some excellent fourth-tier load balancing software that speeds up to the efficiency of hardware load balancing. Of course, on the speed or other people's hardware faster, after all, people that price placed there, a F5, a hundred thousand of, hundreds of thousands of, millions of dollars.

The fourth layer is compared with the seventh layer: excellent is fast, can sense the state of the cluster server. The downside is the inability to perceive the state of the application-layer software, such as the IIS site hanging off, but if the server is not hung up, the conversion traffic continues to flow into the server.

Now a lot of the fourth tier load balancer software, I mean Linunx server under. If you use Windows, I suggest that everyone eat their family barrels. Performance must not be maximized. But on the stability, maintenance or the whole family barrels so, worry, effort.

If you buy a genuine Microsoft system, you can also have a phone call for an engineer to help you solve the problem. The premise is that you have to use a family bucket.

Common fourth-tier load balancing software: LVS,NLB, there are other, for a moment can't remember, too lazy to check.

The following is how to install NLB, of course, I use the operating system with a GUI, the general situation of Linux is not installed GUI, but window of black box I have not used to, do not use, first use with GUI

First point to Service Manager.

Always point to "next" until you hook up this

The installation was successful.

Each server that participates in NLB needs to be installed. Unlike Arr, arr only needs to be installed on the forwarding server.

As a demonstration example, install NLB on three servers.

respectively is

192.168. 99.8 192.168. 99.10 192.168. 99.11

Just talk about the principle.

All requests are distributed to each NLB server, and then the NLB server processes its own request based on the algorithm.

So all the requests are distributed to each server, because they have a public IP. It is also said that each server has two IPs.

Yes, each computer can have multiple IP addresses.

Advanced options, you can add multiple IP addresses manually.

Open Network Load Balancing Manager, new cluster

Always point to "next" until finished.

The 192.168.99.10,192.168.99.20 servers are operated separately.

Always point to "next" until finished.

Cluster deployment is complete.

We look at IP, and you find that one more public ip,192.168.99.20 this is the IP of the cluster.

After we've set up, we'll go for a try, and after the success of the test run, let's talk about some details.

First, IIS is going to do some setup, because we will use the public IP for access, that is 192.168.99.20

Visit http://192.168.99.20/api/home/GetUserChat

The successful return, the old rule, now uses the VS2017 to carry on the pressure test, after the finished, the point details configuration this matter completes.

The test was successful, but the problem was pretty obvious.

First, the data is indeed widely distributed to each server, and we can see that the size of the received data is the same 5.4Mbps

Second, the size of the data sent is completely different, which means that the processing is not the same. We can clearly see that 192.168.99.10 this server, which takes up most of the work. The CPU is up to 94% and the sending packet reaches 1.5Mbps.

It is obvious that the cluster configuration is not appropriate. Let's talk about the details.

Cluster operation mode:

Unicast: All node server Mac will be changed to cluster Mac, when sending data, the source Mac becomes the cluster Mac. Disadvantage: The Mac table of the switch cannot bind the Mac to that port, and all packets are broadcast to create a traffic burden. All node servers have the same Mac and cannot communicate. That is, the cluster node has the same IP and the same MAC address.

Multicast: Does not modify the node server's Mac, but adds one more cluster Mac to the dedicated node server, where the nodes can communicate with each other through private IPs.

Single-NIC multicast, dual-NIC unicast. Dual network card can be set to become private IP network card, to solve the unicast node can not communicate with each other problem.

Cluster port rules:

Filter Mode:

Multiple hosts: All data is processed by multiple servers.

Single Host: All data is processed by one server and the server is selected according to priority.

Disable this port range: Disables data for this port and is processed.

Multiple host mode, dependency:

None: handled by the load Balancer root algorithm, which basically requests an average allocation.

Single: The same client request that belongs to the original processing server.

Network: The allocation is determined based on the IP's Class C address range. That is, the request for the same network segment is assigned to a server.

Priority: All forwards in the cluster are processed according to the port rules, and if they do not conform to the port rules, the server with the least priority is processed.

Why do we start, 192.168.99.10 to endure a lot of work, because the port rules are not set up, we now reset the port rules, then test it.

Previous default settings

Configuration after re-setting

Okay, let's go back to the pressure.

Network acceptance and transmission are more equal.

The number of requests accepted by each server is approximately equal.

Processing of 150 per second. Matches the server data.

Load balancing basically achieves the desired effect.

The NLB cluster test is complete.

Windows layer Fourth load balancing--based on NLB load balancing

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.