1. Polling method
The request is distributed sequentially to the back-end server, which treats each server on the backend in a balanced manner, regardless of the actual number of connections and current system load on the server.
2. Stochastic method
The random algorithm of the system, according to the list size value of the back-end server to randomly select one of the servers to access. The probability statistic theory can be used to know that as the number of clients invoking the server increases,
Its actual effect is getting closer to the average allocation of calls to each server on the backend, which is the result of polling.
3. Source Address Hash method
The idea of the source address hash is to obtain the client's IP address, through the hash function to calculate a value, with this value to the size of the server list to take a modulo operation, the result is the customer service side to access the server serial number. The client with the same IP address, which is load balanced with the source address hash, maps to the same back-end server for access every time when the back-end server list is not changed.
4. Weighted round-robin method
Different back-end servers may not have the same machine configuration and current system load, so they have varying compression capabilities. Configure a high, low-load machine with higher weights to handle more requests, and configure low, high-load machines, assign them lower weights, lower their system load, and weighted polling handles the problem well and assigns the order of requests to the backend by weight.
5. Weighted Stochastic method
As with the weighted polling method, the weighted stochastic method is also based on the configuration of the backend machine, and the load of the system is assigned different weights. The difference is that it is randomly requested by weight on the backend server, rather than in order.
6. Minimum connection number method
The minimum number of connections algorithm is more flexible and intelligent, because the configuration of the backend server is not the same, the processing of the request is fast and slow, it is based on the current connection of the backend server, dynamically select the current
A server that has the fewest backlog of connections to handle current requests and, as much as possible, improves the efficiency of back-end services and is responsible for properly diverting to each server.
6 Load Balancing Algorithms-Reprint