Advantages of individual use: Easy to configure, less security vulnerabilities (e.g., using the case of JSP downloads)
What is the situation where you need to use Apache+tomcat? To analyze
1. Load balance
If you need load balancing, APACHE+TOMCAT+MODJK is a choice, using it, you can split the application server into multiple servers, such as: can be split into:
(1), Management end application Server
(2), client Application Server
(3), report, print server on a single machine
(4), the bulk operation of the server in one place (such as a large number of reconciliation account)
(5), can even give each batch of customers a server, such as different provinces
2, a variety of Web server features
As you all know, Apache has countless mod, these mod provides a variety of rich Web features, if you need these features, Apache is an essential choice
Like what:
(1) Virtual host
The same IP to use a number of different domain names, then Apache to help you complete this problem
(2) Urlrewrite
3, fast corresponding performance
The advantage of fast response Apache can be said to be far more than other servers, an Apache can only be forwarded to drag countless Tomcat servers to run
4, on the processing of binary files
for processing of. jpg. css. js. html, Apache has far more performance than Tomcat, which can be configured to Apache
5, for the request on the line
6, for the occupation of resources.
For instance, for example, Application service development uses Open-session-in-view, and if only Tomcat is used to send response content to the client after processing is completed, if the network is slow, the session of the application server will not be closed. Has been waiting, easy to cause the database connection too much, causing problems. There are a lot of similar resource occupancy issues.
If you use Apache+tomcat, because Apache and Tomcat are on the same LAN, and all the Requese and response are Apache and Tomcat interacting, there's no problem with this department, And the end customer is Apache and end user, Apache does not occupy these resources, does not cause this kind of problem.