The basic algorithms for load balancing are as follows (refer to F5 products):
- Random: Load Balancing method randomly distributes the load to each available server, selects a server by the random number generation algorithm, and sends the connection to it. While many of the balanced products support this algorithm, its effectiveness has been challenged until the server's uptime is seen to be heavy.
- Polling: The polling algorithm assigns each new connection request to the next server in order, eventually splitting all requests to all servers. Polling algorithms work well in most cases, but if load-balanced devices are not fully equal in terms of processing speed, connection speed, and memory, the effect is better.
- Weighted polling: In this algorithm, the number of connections accepted by each machine is allocated by weight ratio. This is an improvement to the ordinary polling algorithm, such as you can set: The third machine is capable of processing twice times the first machine, then the load balancer will allocate twice times the number of connections to the 3rd machine.
- Dynamic polling: Similar to weighted polling, however, weight values are based on ongoing monitoring of individual servers and are constantly updated. This is a dynamic load balancing algorithm that allocates connections based on the real-time performance analysis of the server, such as the current number of connections per node or the fastest response time for a node.
- Fastest algorithm: The fastest algorithm is based on the fastest response time allocation connection in all servers. This algorithm is particularly useful in environments where servers span different networks.
- Minimum connection: The system assigns the new connection to the server with the fewest number of current connections. This algorithm is very effective in the environment where the computing ability of each server is basically similar.
- Observation algorithm: The algorithm uses the minimum connection algorithm and the fastest algorithm to implement load balancing. The server gets a score based on the current number of connections and response time, the higher the score, the better the representation, and the more connections.
- Pre-judgment algorithm: This algorithm uses the observation algorithm to calculate the score, but the pre-judgment algorithm will analyze the change trend of the score to determine whether the performance of a server is improving or decreasing. Servers with improved trends will get more connections. The algorithm is suitable for most environments.
Basic algorithms for load Balancing