Transferred from: https://www.cnblogs.com/xrq730/p/5154340.htmlWhat is load balancingLoad balancing, the English name is load Balance, refers to the multiple servers in a symmetric way to form a collection of servers, each server has an equivalent status, can be provided separately from external services without the assistance of other servers. With a
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 header, So the DR and Realserver must be in
1. Random algorithm:the load balancing method randomly assigns the load to each available server, selects a server by the random number generation algorithm, and sends the connection to it. the same request will fall to machine A, a will fall on machine B, the cache will be frequently eliminated, so that the cache hit rate is low. 2. Polling algorithm:The polling
reproduced from this blog: http://blog.csdn.net/u014649204/article/details/25115039the design of the balance algorithm directly determines the cluster in Load Balancing performance, poorly designed algorithms can lead to unbalanced load on the cluster. The main task of the general
Load balancing algorithms can be divided into two categories: Static load Balancing algorithm, server-based capacity, is a high-configuration server than the low-provisioned server to allocate more requests, dynamic load
server list is not changed.4. Weighted round-robin methodDifferent back-end servers may not have the same machine configuration and current system load, so they have varying compression capabilities. Configure a high, low-load machine with higher weights to handle more requests, and configure low, high-load machines, assign them lower weights, lower their system
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
The main load balancing algorithms are useful in Nginx, the following article on these algorithms introduced in more detail, please refer to.
http://baidutech.blog.51cto.com/4114344/1033718
The paper mentions several common software load
: #ipvsadm -a -t 172.16 .100 .1 : 80 -r 192.168 .10 .9 -m 5. View-L|l[options]-n:数字格式显示主机地址和port号--stats:统计信息--rate:速率--timeout:显示tcp、tcpfin和udp会话的超时时间值--daemon--sort:跟协议、地址、port进行排序,默觉得升序-c:显示当前ipvs连接状况6. Remove all cluster Services: -C:清空ipvs规则7. Save the Rules-S:(用输出重定向进行保存)格式:`#ipvsadm -s >/path/to/somefile`8. Load the previous rule:-R格式:`#ipvsadm -R View Original
Original works, agreed to reprint, please be sure to use hyperl
Load balancing, the cluster must be mastered, the following describes several algorithms of load balancing.1, polling, that is, all requests are distributed once on the server, each server processing requests are the same, suitable for the same computer hardware.2. Weighted
ip)每个请求按访问ip的hash结果分配,这样每个访客固定访问一个后端服务器,可以解决session的问题。Upstream favresin{Ip_hash;Server 10.0.0.10:8080;Server 10.0.0.11:8080;}fair(第三方)按后端服务器的响应时间来分配请求,响应时间短的优先分配。与weight分配策略类似。Upstream favresin{Server 10.0.0.10:8080;Server 10.0.0.11:8080;Fair}Url_hash (third Party)Assign requests by the hash result of the access URL so that each URL is directed to the same back-end server, which is more efficient when the backend server is cached.Note: In upstream the hash statement is added, the server stateme
Load balancing, the cluster must be mastered, the following describes several algorithms of load balancing.1, polling, that is, all requests are distributed once on the server, each server processing requests are the same, suitable for the same computer hardware.2. Weighted
I. SummaryAs the system becomes larger and more complex, the system architecture is developed from the original single system to the vertical system to the present distributed system. In the distributed system, the public service module can be high availability, high fault tolerance, high scalability, however, when the system becomes more and more complex, things need to be considered more and more naturally, the requirements are more and more high, such as service routing,
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.