The dynamic feedback load balancing algorithm takes into account the real-time load and the response of the server, adjusts the ratio of processing requests between servers, to avoid some servers being overloaded and still receive a large number of requests, thus increasing the throughput rate of the whole system. Figure 1 shows the working environment of the algorithm, running the monitor daemon process on the load scheduler, and monitor daemon monitors and collects the load information for each server. The Monitor daemon can calculate a composite load value based on multiple load information. Monito R Daemon calculates a new set of weights for each server's combined load and current weights, and if the difference between the new weight and the current weight is greater than the set threshold, Monitor daemon sets the server's weight to the Ipvs dispatch in the kernel, In the kernel, the connection scheduling is generally based on the weighted scheduling algorithm or the weighted minimum connection scheduling algorithm.
Figure 1: The working environment of dynamic feedback load balancing algorithm
Connection scheduling
When a client accesses network access over a TCP connection, the time required for the service and the computational resources to be consumed vary widely, depending on a number of factors. For example, it relies on the type of service requested, current network bandwidth, and current server resource utilization. Some load-heavy requests require computationally intensive queries, database access, long response data streams, and lighter-load requests that often require only reading an HTML page or making simple calculations.
The diversity of request processing times can cause the server to exploit the skew (Skew), the load imbalance between servers. For example, there is a Web page with a, B, C, and D files, where D is a large image file, and the browser needs to establish four connections to fetch the files. When multiple users access the page at the same time through a browser, the most extreme case is that all D files are sent to the same server. So it's possible that some servers are overloaded and other servers are basically idle. At the same time, some servers are already busy, have a long queue of requests, and continue to receive new requests. Conversely, this will cause customers to wait for a long time and feel that the system is poor quality of service.