Learn about round robin load balancing algorithm, we have the largest and most updated round robin load balancing algorithm information on alibabacloud.com
Use lvs to achieve ftp load balancing and lvsftp Load Balancing
Operating System: CentOS6.5 _ x64
Problem description
Use lvs to achieve ftp Load Balancing
To make the model simple enough, only loadblance is implemented here, and
member (node) in the queue has the same status. The rotation method simply rotates and selects members in the group. In the load balancing environment, the balancer sends new requests to the next node in the node queue in turn. In this continuous and cyclical manner, each cluster node is selected in turn under the same status. This algorithm is widely used in DN
Nginx implements detailed configuration of Cluster load balancing, nginx Load Balancing
In fact, the Nginx Server Load balancer function is the same as the nginx proxy function. Instead, you only need to change one proxy machine to multiple servers. Compared with lvs, Nginx
server according to the cyclic schedule sequence.
minimum connection. the least-connection algorithm sends the request to the server, depending on which server in the cluster is currently processing the fewest number of connections.
based on load. the load-based algorithm first determines which server in the c
none are included then $request_uri make similar choices in, and so on.
Whichever way you choose to keep the session consistent, if the selected server is not available, the next server will continue processing in the server list according to the load Balancing algorithm (such as Round-robin).
Real-time Health check
A
Foreword: Recently in for our products in the high availability, while the environment, while understanding the relevant knowledge, search this blog, good quality, articulate clear, so reproduced to learn. Tags: detailed description of the three operating model of LVS load balancing and 10 scheduling algorithms original works, allow reprint, please be sure to use hyperlinks in the form of the original sourc
Http://publish.it168.com/2006/0315/20060315030001.shtml
1. DNS load balancing method
The RR-DNS (round-robin Domain Name System) takes turns by: In a DNS server,You can configure the same name for multiple IP addresses. When the client queries this name, it will get an address when parsing this name. Therefore, for the same name, different clients will get differ
Basic load balancingAlgorithm, Mainly including the following (refer to F5 products ):
Random: The Load Balancing Method Randomly distributes the load to each available server, selects a server through the random number generation algorithm, and sends the connection
Linux: Round Robin algorithm, Active-Backup algorithm, MAC address XOR algorithm (MAC-XOR ). The following is a simple analysis of the three main algorithms.
3.2.1 Rotation Algorithm
The algorithm is based on the principles of fa
Telecom and China Netcom. the implementation principle is calculated based on the server Load balancer algorithm. If the data of the target address is least delayed, the link will be prioritized. this is the difference between the Server Load balancer device and the rule routing + IP address library for China Netcom's route selection.
2.Server
The pros and cons of load balancing strategies and their ease of implementation have two key factors:(1) Load Balancing algorithm(2) The detection mode and ability of network system condition1. round robin (Round
;Short delay, suitable for streaming media and other applications with high latency requirements
High performance with high throughput
The server can receive the real Access source client IP address directly
can only do 4-tier load balancing, 7-tier service cannot be optimized (such as compression, etc.) cannot be used
Need to configure the loopba
example, the two realservers are both processing 500 connections at the beginning. Before the next request arrives, server1 only disconnects 10 connections, while server2 disconnects 490 servers. However, at this time, it is redirected to server1, server1.
The dynamic scheduling mode is used to calculate who should be scheduled for the next connection based on the RS's busy degree feedback (the dynamic feedback load
high throughput
The server can receive the real Access source client IP address directly
can only do 4-tier load balancing, 7-tier service cannot be optimized (such as compression, etc.) cannot be used
Need to configure the loopback address on the server
A common scheduling algorithm for server
, the throughput of the cluster system is greatly improved.? VS/DR: That is (virtual server via direct Routing), that is, the use of direct routing technology to implement virtualized servers. Its connection scheduling and management is the same as in Vs/nat and Vs/tun, but its message forwarding method is different, vs/dr by overwriting the request message's MAC address, send the request to real server, and real server to return the response directly to the customer, eliminating the vs/ The IP
will be the request for this service IP all directed to Dr, and Dr received the packet according to the scheduling algorithm, to find the corresponding realserver, Change the destination MAC address to Realserver's Mac and send it to this realserver? At this point, the Realserver receives this packet, it is equal to receive the packet directly from the client, the processing is returned to the client directly? Because Dr wants to change the two-layer
compiled into the Nginx kernel, simply by specifying the parameters in the Nginx configuration. There are many extension strategies, such as fair, universal hash, consistent hash, etc., by default not compiled into the Nginx kernel. Since there is no intrinsic change in the load-balanced code in the Nginx version upgrade, the following will take the nginx1.0.15 stable version as an example to analyze each strategy from the source point of view. 2.1.
the parameters in the Nginx configuration. There are many extension strategies, such as fair, universal hash, consistent hash, etc., by default not compiled into the Nginx kernel. Since there is no intrinsic change in the load-balanced code in the Nginx version upgrade, the following will take the nginx1.0.15 stable version as an example to analyze each strategy from the source point of view. 2.1. Weighted polling (Weighted round
load balancingWe know that the role of load balancer in load balancing devices is crucial, and it plays a connecting role. On the one hand, receives the user's network request, on the other hand transfers the request according to some algorithm to the specific application s
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.