With the development of computer technology and the Internet,Web has become an increasingly important network application.It has promoted the growth of network traffic,which also makes Web services face enormous challenges.Some small web application systems,such as course selection system in colleges,occasionally have high concurrency.In this situation,a large number of users access the web server in a short time.The backend server will respond slowly or even downtime,affecting the user experience and consuming the cost of network maintenance.In order to solve the above problems,this paper proposes a concurrency control method based on reverse proxy for high concurrent websites.The method is based on a reverse proxy server,queuing user sessions accessing the website server,collecting real-time response time of the back-end web server,and dynamically adjusting the queuing policy of the user session through the queue length and the calculated average response time.In this way,the web server smoothly passes the traffic peak and improves the overall processing efficiency.Compared with the common connection limitation and IP concurrency limitation method,the proposed mechanism for queuing user sessions is more suitable for sporadically concurrent small Web application systems.It keeps the user's average stay time as short as possible while ensuring a fast response.Moreover,since the method is based on a reverse proxy,there is no need for a backend transformation for the web server,which is easy to maintain and upgrade.Based on the above method,the reverse proxy system for high concurrent websites developed in this paper includes response time statistics module,queuing module,feedback module and system management background.The response time statistics module is responsible for collecting the response time of the website server and calculating the average response time;the queuing module is responsible for controlling the queuing behavior of the user session;the feedback adj ustment module is responsible for dynamically adj usting the processing pool of the queuing module by the queue length and the average response time of the web server calculated by the response time statistics module to determine the number of user sessions output by the system.;the system management background is a tool for the system administrator to configure and view the reverse proxy system.After completing the design and implementation of each module,this paper designed a simulation experiment to verify the effectiveness of the method and tested the system performance.The simulation results show that this method can effectively improve the back-end response speed by reducing the back-end pressure,so as to improve the overall processing efficiency,and can reduce the average stay time of users and achieve the expected results.The performance test results show that the system can meet the needs of common high concurrent websites. |