| The convenient network makes the Internet user base larger and larger,and the concurrent requests will increase.When a large number of users visit the same site through the network at the same time,there will be high concurrency,and the performance bottleneck of web application will appear.Compared with the high requirements of users for services,the improvement of the processing speed of web applications by servers is far lower than the growth demand of application services.Improving the performance of server hardware alone can not meet the needs of some web application systems.At present,the high concurrency solution adopted by large-scale distributed system is not suitable for small and medium-sized web applications deployed on a single server.It is too expensive to deal with high concurrent traffic through clustering,so it is necessary to put forward available high concurrent network traffic optimization solutions for web applications deployed in a single server.This paper focuses on the problem of high concurrency of network traffic,discusses several algorithms of high concurrency of network traffic,such as leaky bucket algorithm,token bucket algorithm and counter algorithm,and also discusses the optimization of these algorithms in the industry.In view of the shortcomings of leaky bucket algorithm and token bucket algorithm,this paper proposes an improved algorithm of high concurrent network traffic optimization based on these two algorithms,mainly introduces the principle design,structure design and algorithm design of the flow limiting module in the algorithm.This paper proposes a flow control scheme for single server network applications.Based on the leaky bucket algorithm and token bucket algorithm,a high concurrency optimization algorithm for network traffic is proposed.By introducing the level-up and down strategy,temporary container and time stamp mechanism,the peak processing of network traffic can be improved,and the discarding of tagged requests can be reduced,so as to improve the performance of the algorithm Quality of service.In addition,this paper also implements a flow control scheme,optimizes the relevant configuration of the web test system(such as Tomcat server and My SQL),improves the performance of the system for the high concurrent processing of network traffic,and at the same time,the historical data such as the number of requests failed,the number of successful and the number of invalid received in the background can be displayed in the form of pie chart and histogram on the first page of the test system Show it.In this paper,the flow control scheme is tested.The pressure measuring tool is used to simulate the user's request.The flow processing algorithms in the flow limiting module are respectively switched to leaky bucket algorithm,token bucket algorithm and high concurrency network flow optimization algorithm to observe the pressure test of each algorithm for different scale requests.Compared with the leaky bucket algorithm and token bucket algorithm,the number of transactions per second processed by the high traffic concurrent optimization algorithm is increased,and the request time is reduced.The test system proves that the high concurrent network traffic optimization algorithm can better handle the access request of large network traffic than the leaky bucket algorithm and token bucket algorithm.The research of this paper can provide a reference for small and medium-sized enterprises to deal with the high concurrency of network traffic. |