Comparison of Jetty and Tomcat
Same point:
1. Tomcat and jetty are both servlet engines that support standard servlet specifications and Java EE specifications.
Different points:
1. Architecture Comparison
Jetty's architecture is simpler than Tomcat's
The architecture of Jetty is based on handler, and the main extension functions can be implemented with handler, and the extension is simple.
The tomcat architecture is based on container design, and scaling is needed to understand the overall design structure of tomcat and not be scalable.
2. Performance comparison
There is little difference in jetty and Tomcat performance
Jetty can handle a large number of connections at the same time and can stay connected 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 unwanted components, reduce server memory overhead, and improve server performance.
Jetty by default NiO end in processing I/O requests more dominant, in processing static resources, high performance
Tomcat is fit to handle a handful of very busy links, which means that Tomcat's overall performance is higher when the link life cycle is short.
Tomcat defaults to using bio to process I/O requests and is less performance when dealing with static resources.
3. Other comparisons
The application of jetty is faster, the modification is simple, and the support to the new servlet specification is better.
Tomcat is currently widely used, with more comprehensive support for Java EE and servlet, with many features directly integrated.