Font Size: a A A

The Improvement And Implement Of Performance Optimization And Load Balancing In High Performance Nginx Web Server

Posted on:2016-01-27Degree:MasterType:Thesis
Country:ChinaCandidate:Y H WangFull Text:PDF
GTID:2308330473452252Subject:Computer technology
Abstract/Summary:PDF Full Text Request
In today’s society, whether government agencies, financial industry or industrial production, are closely related to the rapid development of the Internet. Especially the way of people’s daily life and the standard of living, which have changed a lot and improved quickly because of the arrival of the Internet. With the increasing use of the Internet, the explosion of concurrent Web access requests to the Internet have brought a serious challenge. It is difficult for a single Web server to respond timely and accurately when the high volume of concurrent access requests come, which prompts people to search for new technology to solve the problem.The most common way to solve this problem is to build a cluster system. Servers work together in the cluster system in order to meet people’s need that they can receive a quick and proper response. The core problem of cluster system is load balancing. And the main purpose of load balancing is to distribute the large number of concurrent requests to the servers in the cluster reasonably, so as to enhance the throughput, resource utilization of the whole system and reduce the response time of the request. Therefore, the algorithm of load balancing plays a decisive role in the enhancement of the performance of cluster system.In this thesis, we analyze and study the built-in load balancing algorithms of Nginix Web server, propose a dynamic load balancing algorithm. We implemented a server cluster system based on Nginix and Tomcat using this algorithm. In this cluster, Httperf and Autobench(both are software) are used to test performance of Nigix built-in weighted round robin algorithm, IP Hash algorithm and fair algorithm, consistent algorithm provided by third parties and our proposed dynamic load balancing algorithm. The result shows: our proposed dynamic load balancing algoritm can achieve better load balancing, and has the following characteristics:(1). slelect the most optimal server: according to the information collected by load balancer, set weight to ratio of server leftover load to server capability. At last, choose one from top three server with highest weight, randomly, to tackle user requests. The probability choosing one server is proportional to the weight proportion. In this way, we avoid always sending requests to server with highest weight. For the latency of information collection, server with highest weight is sometime not the most optimal.(2). group management: divide servers in cluster into several groups, one of which in these groups is designated as central server, it responses for collecting load information of its group, and sending these information to load balancer. Hence, it’s unnecessary for load balancer to communicate with all servers, this reduces load balancer overhead.(3). the prevention of fake halt: when server’s capacity reaches the limit, the time to response new user requests will increase signigicantly. To avoid this, we record response time of each request, using this to estimate if fake halt had occurred, if so, new user requests would be dispatched to other server.
Keywords/Search Tags:Web, Cluster, Load-balancing, Nginx
PDF Full Text Request
Related items