摘要
本文针对当前web应用请求高并发导致响应时间过慢,影响用户体验的问题,引出了Servlet异步处理技术。通过Tomcat7服务器对传统的单实例的Servlet和对具有异步特性的Servlet的不同处理原理的对比,分析了支持异步后的Servlet是如何提高吞吐量和减少请求处理的影响时间,并通过JMeter模拟了多线程高并发访问两种Servlet,从平均响应时间和吞吐量上看出异步特性的Servlet在高并发压力下表现出色。
Aiming at the problem that the response time is too slow due to the high concurrency of current web application requests,which affects user experience,this paper introduces the asynchronous processing technology of Servlet.Through the different processing principles of Tomcat 7 server to traditional single instance Servlet and asynchronous Servlet,this paper analyses how the asynchronous Servlet improves throughput and reduces the impact time of request processing,and simulates two kinds of Servlet with multithreaded and high concurrent access through JMeter.From the average response time and throughput,it can be seen that asynchronous Servlet have high concurrency.Excellent performance under pressure.
出处
《智慧工厂》
2019年第8期57-59,共3页
Smart Factory
作者简介
迟殿委(1982-),男,工学硕士,大学教师,研究方向:数据分析与数据挖掘及JavaEE实战应用等。