Several common algorithms for load balancing of software.

Source: Internet
Author: User
Tags haproxy
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 balancing algorithms, average allocation (polling), weighted polling, IP hash;fair (minimum load balancing) Here, I have seen a colleague analyze the use of this minimum load balancing algorithm may produce jitter, due to machine escalation delay, Also mentioned above , "This strategy has a strong adaptability, but the actual network environment is often not so simple, so use caution." Universal Hash, consistent hash (more convenient for expansion), random allocation.

One of the author's colleagues is the use of weighted random load balancing algorithm: The idle rate per machine [0.01,1] 1-The actual request volume/machine load capacity, and then add the idle rate of all machines and S, randomly produce a [0.01,1] number R; get D=s*r ; Use d minus the idle rate of each machine until D < 0 then select the machine; This method is more gentle than the previous minimum load balancing algorithm.

In addition to nginx there are two commonly used load-balanced software LVS and HAProxy

For a summary of the transfer modes used by three software, see the article:

http://blog.csdn.net/wuqingaixue/article/details/46712105#

The pros and cons of three load balancer software are shown in the article:

nginx/lvs/ Haproxy the pros and cons of the load balancing software

span>http://www.ha97.com/5646.html


Copyright notice: This article for Bo Master original article, without Bo Master permission not reproduced.

Describes several common software load balancing algorithms. , including the aspects of the content, want to be interested in PHP tutorial friends helpful.

  • 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.