Research on Dynamic Weight Load Balancing Technology Based on Nginx
The load balancing strategies are indispensable in ensuring the stable operation and performance of Web server clusters.Among numerous load balancing technologies,Nginx has been widely used and is often applied on a large scale in the front-end of reverse proxy services.Through the study of Nginx load balancing algorithm,an improved dynamic weight load balancing algorithm is designed and implemented.The algorithm uses the Redis cache mechanism to collect and store the CPU utilization,memory utilization,network bandwidth,disk I/O and other performance index information of the back-end Web server in real time.Then,the coefficient of each performance index is calculated by the entropy method,and the weight of the back-end Web server is dynamically modified.The experimental results show that the new algorithm has better response time and throughput in the case of high concurrency compared with the Weighted Round Robin algorithm and the Least Connections algorithm.