Why is apache used in front of tomcat

  • 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 CometWebsockets, 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:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s