2. Flexibility is different: jetty is more flexible, which is reflected in pluggability and scalability. It is easier for developers to redevelop Jetty itself and customize a Web server that suits their own needs. In contrast, the heavyweight Tomcat originally supported too many functions, and the cost of slimming it is far greater than the cost of enriching Jetty.
3. When supporting large-scale enterprise applications, Jetty may need to expand, and Tomcat is better in this scenario.
Wharf advantages:
1 and Jetty have simple architectures, which can load components on demand, reduce unnecessary components and reduce server memory overhead.
2.Jetty adopts asynchronous Servlet, which can handle a large number of connections at the same time and keep the connection state for a long time.
3.Jetty is more dominant in handling I/O requests, and has better performance in handling static resources by using NIO. Jetty is embedded in the application, which enables ordinary applications to quickly support http services.
The above contents refer to Baidu Encyclopedia -jetty.