LVS model and algorithm

Source: Internet
Author: User

one or three different modes(a), Virtual Servervia Network Address translation (vs/nat)

Through the network address translation, the scheduler rewrites the target address of the request message, assigns the request to the backend real server according to the preset scheduling algorithm, and the response message of the real server passes through the scheduler, the source address of the message is rewritten, and the entire load dispatch process is completed when it is returned to the customer.

Request Process:

Data return:

(ii), Virtual Server via IP tunneling (Vs/tun)

When using NAT technology, because the request and response packets must be rewritten by the dispatcher address, when the customer requests more and more time, the scheduler's processing capacity will become a bottleneck, in order to solve this problem, the dispatcher forwarded the request message through the IP tunnel to the real server, and the real server will respond directly back to the customer, So the scheduler only processes request packets, because a network service response is much larger than the request message, using Vs/tun technology, the maximum throughput of the cluster system can be increased by 10 times times

 

(iii), Virtual Server via Direct Ro uting (vs/dr)

VS/DR by rewriting the MAC address of the request message, sending the request to the real server, and the real server returning the response directly to the customer, as with Vs/tun technology, the VS/DR technology greatly improves the scalability of the cluster system without the overhead of an IP tunnel. A network card is attached to the same physical network segment on the real server in the cluster.

two or 10 kinds of algorithms(i), round call scheduling

The scheduler uses the "round-robin" scheduling algorithm to sequentially allocate external requests to real servers in the cluster, and treats each server equally, regardless of the actual number of links and system load on the server.

(b), weighted round call

The scheduler uses the "Weighted round call" scheduling algorithm to schedule access requests based on the different processing capabilities of the real server. This ensures that the processing capacity of the server handles more access traffic. The scheduler can automatically inquire about the load of the real server and adjust its weights dynamically.

(iii), Minimum link

The scheduler dynamically dispatches network requests to the servers with the fewest number of links established through the "least-link" scheduling algorithm, and the "least-link" scheduling algorithm can better balance the load if the real server of the cluster system has similar system performance.

(iv), weighted least link

In the case of the server performance difference in the cluster system, the scheduler uses the "Weighted minimum link" scheduling algorithm to optimize the load balancing performance, the service with higher weights will bear a large proportion of the active link load, the dispatching scheduler can automatically inquire the real server load situation, and dynamically adjust its weight value.

(v) Minimum links based on locality

"Least link based on locality" scheduling algorithm is a load balancing target IP address, is mainly used in the cache cluster system, the algorithm based on the target IP address of the request to find the target IP address of the most recently used server, if the server is available and not overloaded, send the request to the server , if the server does not exist, or if the server is overloaded and has half the workload of the server, a "least-link" principle is used to select an available server and send the request to that server.

(vi), with replication based on the least locality of the link

The "least local link with replication" Scheduling algorithm is also for the target IP address load balancing, is mainly used in the cache cluster system, which differs from the LBLC algorithm is that it maintains a mapping from a destination IP address to a destination IP address to a server, According to the target IP address of the request, the algorithm finds the corresponding server group of the target IP address, selects a server from the server group according to the principle of "least link", if the server is not overloaded, sends the request to the server, and if the server is overloaded, select a server from this cluster by the "minimum link" principle. The server is joined to the server group, the request is sent to the server, and when the server group has not been modified for some time, the busiest server is removed from the server group to reduce the degree of replication.

(vii), destination address hash

The "Target address hash" scheduling algorithm finds the corresponding server from a statically allocated hash list, based on the requested destination IP address, as a hash key (hash key), if the server is available and not overloaded, sends the request to the server, otherwise returns NULL.

(eight), source address hash

The "Source Address hash" schedule calculates the corresponding server from a statically allocated hash list, based on the requested source IP address, as a hash key (hash key), and if the server is available and not overloaded, sends the request to the server, otherwise returns NULL.

(ix), the shortest expected delay

Based on the WLC algorithm, for example: ABC three machines thousand weight 123, the number of links is also 123, then if the use of the WLC algorithm, a new request entered when it may be assigned to any of the ABC. The SED algorithm is used to perform such an operation a (+)/1 B (1+2)/2 C (1+3)/3 According to the results of the operation, the link is given to C. namely: (server current link number +1)/weight, compare result, take minimum value

(10), Minimum queue scheduling

No queue, if there is a link number of Realserver = 0 directly assigned to the past, do not need to do the SED operation

LVS model and algorithm

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.