Font Size: a A A

The Improvement And Implement Of High Concurrency Web Server Based On Nginx

Posted on:2017-04-04Degree:MasterType:Thesis
Country:ChinaCandidate:Y ZhangFull Text:PDF
GTID:2308330482994714Subject:Software engineering
Abstract/Summary:PDF Full Text Request
At present, the Internet has been widely spread and application, even leave the Internet we will not be able to work and live normally. The development of personal computers and mobile devices makes the instant information and entertainment services become more convenient and delicate, the increasing number of basic users makes applications a huge page view. In order to provide safe and reliable service, the server side is facing increasing pressure. Considering the system scalability and cost effectiveness, the technical team has put forward distributed cluster in succession to build their own server system. As the core of cluster system research, the high concurrency Web server load balancing technology has solved the problem of reasonable allocation of the system when accepting a large number of requests.As efficient Web server, Nginx has successfully helped many technical teams to solve the problem of high load on the server. This paper first introduces the Nginx system module architecture and working principle of the process.Then analyzes original weighted round robin, IP hash strategy as well as the least number of connections, and proposes a load balancing strategy which is based on the advantages and disadvantages. This kind of dynamic strategy is improved in the original weighted round robin strategy, update the node weight dynamically based on the performance of CPU, memory, disk IO, and network of the nodes in the operation, makes the nodes in the system can be assigned to the request task quantity corresponding to the current load capacity, enhances the performance of the cluster and improves the efficiency. Through the analysis of the module source code and data structure of Nginx, the processing flow of this dynamic strategy is designed and implemented. Finally, uses the siege performance test tools to test the performance of the original weighted polling strategy and dynamic strategy presented in this article, the experimental results show that the proposed dynamic strategy can achieve a better load balancing.Compared with the original load balancing strategy, the load balancing strategy of this kind of dynamic load balancing strategy proposed in this paper has the following characteristics:(1)a more comprehensive performance evaluation of nodes, through collecting each node CPU of the back-end server, memory, disk IO,network bandwidth and other performance, the performance weight of this node is calculated, compared with empirical assignment, this calculation method is more comprehensive and effective.(2)set the weights modify threshold, in the load balancing strategy of dynamically adjusting weights, frequent changes in weight, sometimes not only does not bring performance improvement, but will cause the system to jitter, So, by calculating the standard deviation of the node resource usage, it is to judge whether the node load is balanced or not, if not balanced, i.e., standard deviation is higher than the preset threshold, then start weight modification process.(3) set the concept of redundancy, collect the node load information periodic, in order to better forecast cycle node load and prevent overload node, the redundant performance of the cycle is calculated according to the load condition of the last period, when the redundancy value is too low, assign fewer tasks to the node.(4) modify weights dynamically, when the judge needs to modify the weight, the system will calculate an incremental according to the utilization rate of the resource node,implement the weight to the increment of subtraction and addition operations for the load of the node too much or too little, and update the change weights.
Keywords/Search Tags:High Concurrency, Nginx, Web server, Load Balancing
PDF Full Text Request
Related items