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.