-
Apache Versus Tomcat (3 messages)
- Posted by: Apurva Mehta
- Posted on: January 10 2006 14:00 EST
Why is apache used in front of tomcat, even though TomCat is much faster ? Could someone give some explanation on both. Thanks.Threaded Messages (3)
- Apache Webserver in front of Tomcat by Gunther Van Roey on January 11 2006 02:43 EST
- One additional reason by Gunther Van Roey on January 11 2006 02:47 EST
- Failover ... by lokesh pant on January 13 2006 03:15 EST
- One additional reason by Gunther Van Roey on January 11 2006 02:47 EST
-
Apache Webserver in front of Tomcat[ Go to top ]
- Posted by: Gunther Van Roey
- Posted on: January 11 2006 02:43 EST
- in response to Apurva Mehta
Hi,
Most of the time, Apache is put in front of Tomcat for one of the following reasons:
1/ Apache can server static content (HTML, images, CSS, PDFs, etc...) a lot faster than Tomcat can.
Your perception of Tomcat being faster than Apache is not correct in my opinion.
2/ Apache has the capability of reverse proxying, allowing you to 'plug in' one or more web applications running on one or more Tomcat instances in one URL space.
3/ A stripped down box with only Apache running on it can be put in the DMZ, and the Tomcat server can be put in the internal network (behind a second firewall) for security reasons.
4/ Apache can be used as a load balancer over multiple tomcat instances
I personally like this approach for projects of a certain size. For smaller, less demanding applications the Tomcat-only solution may be easier to maintain.
kind regards,
Günther Van Roey.
XT-i -
One additional reason[ Go to top ]
- Posted by: Gunther Van Roey
- Posted on: January 11 2006 02:47 EST
- in response to Gunther Van Roey
One additional reason one might have to put Apache Webserver in front of a Tomcat server:
Apache has a large amount of interesting plugins that might be useful for your website (eg: mod_rewrite, ...)
By using Apache as the main webserver, and tomcat only for serving dynamic web content, you can combine the best of both worlds in one (or virtually one) site.
Günther Van Roey.
XT-i -
Failover ...[ Go to top ]
- Posted by: lokesh pant
- Posted on: January 13 2006 03:15 EST
- in response to Gunther Van Roey
moreover Configuration can be done using mod_jk .
Apart from loadbalancing, Two apache on two diff boxes can be used so that if one of the box/apache fails/crashes than the session and user state can be maintained on the other.
so a FAILOVER can be implemented.
So clustering apache is the best solution for loadbalancing,static response and failover..
--lokesh
http://lokeshpant.blogspot.com