- Performance – If you have a lot of static content, serving it with Apache will improve your performance. If most of your content is dynamic, using Tomcat or Glassfish alone will be just as fast (probably faster).
- Scalability – You can load balance multiple instances of your application behind Apache. This will allow you to handle more volume, and increase stability in the event one of your instances goes down.
- Security – Apache, Tomcat, and Glassfish all support SSL, but if you decide to use Apache, most likely thats where you should configure it. If you want additional protection against attacks (DoS, XSS, SQL injection, etc.) you can install the mod_security web application firewall.
- Additional Features – Apache has a bunch of nice modules available for URL rewriting, interfacing with other programming languages, authentication, and a ton of other stuff.
Different view is HERE:
- The AJP connector does not and will not support advanced IO meaning no Comet, Websockets, etc.
- If your not using AJP I have noticed there is a pretty big proxy overhead when using mod_proxy for Apache. So if your looking for low latency Apache infront would not be good.
- Apache has a rather big foot print compared to Nginx or Lighttpd etc.
Putting Apache infront does NOT:
- Improve performance. Tomcat will run just as fast as Apache (in some cases faster) with APR.
- Improve Security. I don’t think I have ever seen a true security problem with Tomcat. I don’t know where this BS comes from that Tomcat is less secure than Apache.