Both Apache and Tomcat are projects developed by Apache open-source organizations to process HTTP services. Both are free of charge and can be run as independent Web servers. Apache is a Web server and Tomcat is a Java application server. Apache: implemented in C language, specifically used to provide HTTP services...
Both Apache and Tomcat are projects developed by Apache open-source organizations to process HTTP services. Both are free of charge and can be run as independent Web servers. Apache is a Web server and Tomcat is a Java application server.
Apache: implemented in C language and used to provide HTTP services.
Features: simple, fast, stable, and configurable (agent)
1. it is mainly used to parse static text and has high concurrency performance, focusing on HTTP services;
2. supports static pages (HTML) and does not support dynamic requests such as CGI, Servlet/JSP, PHP, and ASP;
3. strong scalability. you can use the plug-in to support PHP and one-way Apache connection to Tomcat for connectivity;
4. Apache is the world's top Web server.
Tomcat: a JSP server (Servlet container) developed by Java that complies with the Servlet specifications of JavaEE and is an extension of Apache.
Feature: free Java application server
1. it is mainly used to parse JSP/Servlet and focuses on Servlet engines;
2. support for static pages, but the efficiency is not as high as Apache; support for Servlet and JSP requests;
3. Tomcat itself has an HTTP server built in to support static content. it can be integrated with Apache through Tomcat's configuration management tool.
Apache + Tomcat:
Advantages after integration:
Apache processes the static webpage in Shenzhen and returns the result. for dynamic requests, Apache forwards the resolution to Tomcat. after Tomcat processes the result, Apache returns the result. In this way, the division of labor and cooperation can be achieved to achieve load balancing and improve system performance.
Summary:
For example, Apache is a truck with some things such as html. But you cannot hold water (JSP). to hold water, you must have a container (bucket). Tomcat is a bucket (such as JSP), which can be placed on a truck.