Frequently Asked Questions: computer network / load balancing algorithm

Polling Method & weighted polling method

The request to the internal server in turn points, stateless simple algorithm, but the algorithm assumes that all servers in the same performance, and is not concerned about the current state of the server response speed, easily lead to load imbalance. Thus the configuration according to the weight ratio of the polling, in accordance with a valid server performance tuning, more practical. But the lack of dynamic fault-tolerant polling method.

Law & random weights randomly

That the random access through the random function, and the polling ideas, request amount is substantially uniformly distributed, and the polling equivalent, therefore, based on the same method of polling a defect generated random weighting method, the weight increases in a random process, the basic equivalent weights and polling.

Consistent hashing polling method

Use consistent hashing ring, a node can respond to a situation hang. To prevent avalanche, using consistent hashing virtual hash into a plurality of physical servers evenly distributed hash values ​​in the ring, the virtual address assigned weights can also be used. In addition, the advantage of consistent hashing is that you can ensure that clients use the same address of the same server services.

The minimum number of connections Method

The minimum number of connection method to look from the perspective of server load balancing, based on the current status of the server dynamically select the smallest number of connections squeeze a server to provide services, efficiency as high as possible to improve the back-end server.

Guess you like

Origin www.cnblogs.com/cielosun/p/11505292.html