Comparison of Jetty and tomcat
Reprinted: http://www.voidcn.com/article/p-gujodytc-ht.html
Similarities: < br> 1. Tomcat and Jetty are both a servlet engine, they both support standard servlet specifications and JavaEE specifications.
Different points:
1. Architecture comparison
Jetty’s architecture is simpler than Tomcat’s
Jetty’s architecture is implemented based on Handler, and the main extension functions can be used Handler To achieve, the extension is simple.
The architecture of Tomcat is designed based on containers. To expand, you need to understand the overall design structure of Tomcat, which is not easy to expand.
- Performance comparison
Jetty and Tomcat have little difference in performance
Jetty can handle a large number of connections at the same time and can maintain connections for a long time, suitable for web chat applications and so on.
Jetty’s architecture is simple, so as a server, Jetty can load components on demand, reduce unnecessary components, reduce server memory overhead, and improve server performance.
By default, Jetty uses NIO to terminate the processing of I/O requests. It has higher performance when processing static resources.
Tomcat is suitable for processing a few very busy links, that is If the link life cycle is short, the overall performance of Tomcat is higher.
Tomcat uses BIO to process I/O requests by default, and its performance is poor when processing static resources.
- Other Jetty applications are faster, simpler to modify, and better support for the new Servlet specification. Tomcat is currently widely used, with more comprehensive support for JavaEE and Servlet, and many features will be directly integrated.
Comparison of Jetty and tomcat
Reprinted: http://www.voidcn.com/article/p-gujodytc-ht. html
Similarities:
1. Tomcat and Jetty are both a servlet engine, they both support standard servlet specifications and JavaEE specifications.
Different points:
1. Architecture comparison
Jetty’s architecture is simpler than Tomcat’s
Jetty’s architecture is implemented based on Handler, and the main extension functions can be used Handler To achieve, the extension is simple.
The architecture of Tomcat is designed based on containers. To expand, you need to understand the overall design structure of Tomcat, which is not easy to expand.
- Performance comparison
Jetty and Tomcat have little difference in performance
Jetty can handle a large number of connections at the same time and can maintain connections for a long time, suitable for web chat applications and so on.
Jetty’s architecture is simple, so as a server, Jetty can load components on demand, reduce unnecessary components, reduce server memory overhead, and improve server performance.
By default, Jetty uses NIO to terminate the processing of I/O requests. It has higher performance when processing static resources.
Tomcat is suitable for processing a few very busy links, that is If the link life cycle is short, the overall performance of Tomcat is higher.
Tomcat uses BIO to process I/O requests by default, and its performance is poor when processing static resources.
- Other Jetty applications are faster, simpler to modify, and better support for the new Servlet specification. Tomcat is currently widely used, with more comprehensive support for JavaEE and Servlet, and many features will be directly integrated.