Font Size: a A A

Research And Improvement Of Load Balancing Strategy Based On Nginx Server

Posted on:2019-11-09Degree:MasterType:Thesis
Country:ChinaCandidate:G F XiongFull Text:PDF
GTID:2428330626950237Subject:Engineering
Abstract/Summary:PDF Full Text Request
With the rapid development of Internet and network applications,the concurrent traffic and load of servers have increased exponentially.The processing capacity and load capacity of a single server cannot meet the increasing network requirements.In order to avoid network delay and system collapse caused by single server overload,server cluster and load balancing technology are introduced.In order o solve the problem of server overload caused by high concurrent requests during the course selection for the course selection system in campus,server cluster and load balancing technology are applied in this paper.In the paper,a server cluster based on node is built,at the same time,in order to avoid the entire system can not normally provide services when the front end load balancer fails,the paper use nginx and keepalived which is a kind of high availability software to implement a dual-system hot standby scheme to ensure the system can operate stably.In order to exchange load information between the load balancer and the cluster in time,the paper use redis and keepalived built a cache server with master-slave replication.This paper also researches and analyzes the source code of the nginx server.In order to achieve a better load balancing effect,this paper optimizes the design for its built-in load balancing strategy,and proposes a dynamic load balancing strategy.By developing the load collection software,periodically get the load information of the backend cluster.Calculating the carrying capacity and load of the node according to the collected load information,and then calculate the weight of nodes,finally,calculate the composite load according to the response time of the node and the number of connections.If the node weight is higher and the composite load is lower,the probability of distributing to the request is higher.Therefore,according to the minimum value of the composite load and weight ratio of the nodes in the backend cluster,one node is selected to forward the request.If there are multiple nodes all having the minimum value,then one node is selected from the round_robin strategy.By testing the round_robin and least_conn strategy built in nginx and the dynamic load balancing strategy proposed in this paper,counting the average response time of user requests and the number of requests failed to be handled by the backend cluster,and the test results are compared and analyzed,it is found that the improved load balancing strategy makes the resources in the server cluster more fully utilized,and the throughput and processing capacity of the system are improved.
Keywords/Search Tags:Load balancing, Nginx, Hot standby, Load collection
PDF Full Text Request
Related items