: This article mainly introduces several common software load balancing algorithms ., If you are interested in the PHP Tutorial, refer. The main load balancing algorithms are useful in nginx. the following article describes these algorithms in detail. For more information, see.
Http://baidutech.blog.51cto.com/4114344/1033718
Several common software load balancing algorithms, such as average distribution (round robin), weighted round robin, ip hash, and fair (minimum load balancing), need to be mentioned here, I have seen a colleague analyze that using this minimum load balancing algorithm may cause jitters, due to the delay reported by the machine. at the same time, I also mentioned that "this strategy is highly adaptive, however, the actual network environment is often not that simple, so use it with caution. "; Common hash, consistent hash (convenient resizing), and random allocation.
One of my colleagues is the weighted random load balancing algorithm: the idle rate of each machine [0.01, 1) 1-actual request volume/machine load capacity; then add the idle rate of all machines to S and randomly generate a number R of [0.01, 1). then, D = S * R is obtained; use D minus the idle rate of each machine to D <0 in sequence, then select this machine. this method is more gentle than the algorithm of the preceding minimum load balancing.
In addition to nginx, there are two common load balancing software LVS and HAProxy.
For a summary of the intermediate modes used by the three software, see the article:
Http://blog.csdn.net/wuqingaixue/article/details/46712105 #
For the advantages and disadvantages of the three load balancing software, see the article:
Advantages and disadvantages of Nginx/LVS/HAProxy server load balancer software
Http://www.ha97.com/5646.html
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
The above describes several common software load balancing algorithms ., Including some content, hope to be helpful to friends who are interested in PHP tutorials.