Font Size: a A A

Algorithm Based On Nginx Research On Dynamic Load Balancing Strategy

Posted on:2024-08-23Degree:MasterType:Thesis
Country:ChinaCandidate:M LiFull Text:PDF
GTID:2568307115498464Subject:Electronic Information (Computer Technology) (Professional Degree)
Abstract/Summary:
With the rapid advancement of internet technology,a large number of network applications and services are constantly emerging,putting server clusters under tremendous pressure when processing a massive amount of access requests.To ensure the efficient and stable operation of server clusters,load balancing strategies are particularly crucial in server cluster management.Nginx,as a high-performance web server and reverse proxy server,has been widely used in load balancing applications.In response to the need to improve cluster load capacity under different concurrent requests in the smart campus lock project,this paper selects Nginx,analyzes its structure,principles,and existing load balancing algorithms,and proposes a load balancing algorithm for Nginx that combines dynamic and static algorithms based on an improved adaptive Cuckoo search algorithm to further enhance the load balancing effect of Nginx servers.The specific work content is as follows:(1)A detailed analysis and summary of Nginx’s process model,event-driven model,modular structure,and related configuration files are provided,along with an analysis of Nginx’s built-in and common dynamic load balancing algorithms.The hierarchical analysis method is used to redesign and calculate the load evaluation indicators and index weight coefficients of server nodes,and a load information monitoring and collection module is designed and implemented to collect server node information.(2)To address the issue of the existing Nginx load balancing algorithms under high load conditions,this paper proposes a dynamic load balancing algorithm based on adaptive threshold of node load evaluation indicators.This algorithm adjusts the allocation weights of server nodes adaptively by considering real-time node load information and changes in cluster load balancing.The proposed algorithm provides excellent load distribution capabilities under high load conditions,offering a new solution for the improvement of Nginx load balancing algorithms.(3)In view of the issue that static load balancing algorithms and dynamic load balancing algorithms have their respective optimal load balancing effects in different concurrent request scenarios,to ensure the optimal load balancing effect of the server cluster in various concurrent request scenarios,this paper studies the cuckoo algorithm and makes improvements to the standard cuckoo algorithm,including improvements to the step size control factor and discovery probability.Based on the improved adaptive cuckoo algorithm,the calculation of the conversion threshold between dynamic and static load balancing algorithms is completed,thereby achieving the switch between dynamic and static algorithms.In summary,this paper proposes a load balancing algorithm for Nginx that combines dynamic and static algorithms based on the improved adaptive cuckoo algorithm.This paper uses the Siege testing tool to validate the algorithm from both simulated network cluster environments and the actual operating environment of the smart academic access control project.By comparing with WRR,least-con,and other dynamic load balancing algorithms through simulation tests and implementing the proposed algorithm and the fair algorithm as Nginx load balancing algorithms in the actual smart academic access control project,the experimental results show that the proposed algorithm effectively reduces the average response time of the server cluster,improves the cluster’s load capacity,and verifies the usability and effectiveness of the proposed algorithm.
Keywords/Search Tags:Nginx, Load balance, Server cluster, Cuckoo algorithm, Analytic hierarchy process
Related items