Several common software load balancing algorithms.

Source: Internet
Author: User
: 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.

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.