The difference between apache, tomcat and nginx

1. The difference between apache and tomcat:

Apache is specially used to provide HTTP services and related configurations (such as virtual hosts, URL forwarding, etc.).

Tomcat is a JSP server developed by the Apache organization under the J2EE-compliant JSP and Servlet standards.

Apache only supports static pages, and tomcat supports dynamic ones, such as servlets. Generally, if apache+tomcat is used, apache is only used as a forwarder, and the processing of jsp is handled by tomcat. It is supported by apache in the background, and the java request is forwarded by apache to tomcat for processing. Apache is a web server, Tomcat is an application (java) server, it is just a servlet (jsp is also translated into servlet) container, which can be considered as an extension of apache, but can run independently of apache.

 

In development:

Tomcat tuning : nginx is dynamically transferred to tomcat, nginx cannot keepalive, and tomcat has keepalive enabled by default, and will wait for the timeout of keepalive. If it is not set by default, connectionTimeout is used.

So you must set tomcat's timeout and close tomcat's keepalive. Otherwise, a large number of tomcat socket timewaits will be generated.

maxKeepAliveRequests="1" can prevent tomcat from generating a large number of TIME_WAIT connections, thereby avoiding tomcat suspended animation to a certain extent.

 

Java Tuning : Java Bytecode, 2

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326654526&siteId=291194637