aspose file tools*
The moose likes Tomcat and the fly likes Tomcat alone vs Apache/Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat alone vs Apache/Tomcat" Watch "Tomcat alone vs Apache/Tomcat" New topic
Author

Tomcat alone vs Apache/Tomcat

John Dunn
slicker
Ranch Hand

Joined: Jan 30, 2003
Posts: 1108
What kind of improvement, if any, is Tomcat & Apache over a stand-alone Tomcat webserver??? At most I'm doing on a few Jsps or one or two servlets that do heavy-duty Enterprise critical work. (i.e. A single servlet to call a serious stored proc)

Can I improve my speed by using Apache with Tomcat?


"No one appreciates the very special genius of your conversation as the dog does."
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Of course, Apache + Tomcat got better performance, since Apache can respond to the static html pages, while Tomcat is working on dynamic contents such as JSPs and Servlets by using its correspondin engines...

If I am not wrong, the http request comes to Apache web server first and it checks whether it is for dynamic contents or not. If it is so, Apache web server forward it to Tomcat...

Since they two work on different tasks, the jobs are shared... If a stand-alone Tomcat is used for both static and dynamic contents, it should be work hard to respond the users...

Hope it helps...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

Of course, Apache + Tomcat got better performance


There are many people who will refute that. If you search through this forum for previous topics on this subject you will find that many people believe that Tomcat standalone can match the performance of the hybrid configuration, and that the only reason to use the Apache hybrid these days is if you require the use of some Apache-only module that is not available with Tomcat.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
gayathri sridhar
Greenhorn

Joined: Sep 15, 2004
Posts: 13
ok i dont understand the webserver - servlet container communication. So this muct be pretty basic. I guess tomcat must be having some limitations on the number of user threads it can spawn for the incoming requests.
So would'nt that become the bottleneck when it comes to increasing performance / serving more requests.

How does having Apache web server performance help here.
Rajan Chinna
Ranch Hand

Joined: Jul 01, 2004
Posts: 320
If my web application consists of more Jsp & Servlets with very little html, shall i go for just Tomcat standalone?

Other than serving static html pages is there any other benefits of using Apache with Tomcat?
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Bear Bibeault:
There are many people who will refute that. If you search through this forum for previous topics on this subject you will find that many people believe that Tomcat standalone can match the performance of the hybrid configuration, and that the only reason to use the Apache hybrid these days is if you require the use of some Apache-only module that is not available with Tomcat.


Oh really, Bear? I don't know that the performance of the hybrid configuration can be matched by Tomcat Standalone. Thanks for the correctness, on my wrong opinion...

So do u think that the modules that is available only in Apache will be integrated to Tomcat in the future? Or is it not possible to do so, because many other factors might be considered?

Thanks, Bear...
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Rajan Chinna:
If my web application consists of more Jsp & Servlets with very little html, shall i go for just Tomcat standalone?

Other than serving static html pages is there any other benefits of using Apache with Tomcat?


Since Bear confirmed that Tomcat standalone is better in performance, whatever it is for static contents or dynamic ones... If we do not need some additional modules from Apache Web Server, we should go ahead with Tomcat standalone...

But I am also doubting about the issue of responding to static contents and dynamic contents... If we use Apache Web Server plus Tomcat, will it be some kinda load balancing between static contents and dynamic contents?

I do hope Budi and Paul might see this thread and reply us with the great explanation about Apache Web Server and Tomcat...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

Since Bear confirmed that Tomcat standalone is better in performance


I confirmed no such thing. Please reread my post, then find the posts I mentioned.

I will say that I use Tomcat standalone in most of my configurations and I have yet to run into a performance problem where I felt a need to investigate alternative configurations. But I'd hardly call my qualitative observations definitive confirmation.
xue shen
Greenhorn

Joined: Jul 05, 2002
Posts: 23
would it make any difference in performance between apache and tomcat vs tomcat alone for a large user bases? For the systems we talked about here, what kind of load the website has to bear?

Sincerely
xue shen
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Bear Bibeault:


I confirmed no such thing. Please reread my post, then find the posts I mentioned.

I will say that I use Tomcat standalone in most of my configurations and I have yet to run into a performance problem where I felt a need to investigate alternative configurations. But I'd hardly call my qualitative observations definitive confirmation.


I got it, Bear... Hope Rajan Chinna can also figure it out what you actually mean in your posts...

Thanks for the explanation, Bear...
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Originally posted by xue shen:
would it make any difference in performance between apache and tomcat vs tomcat alone for a large user bases? For the systems we talked about here, what kind of load the website has to bear?

Sincerely
xue shen


This link will help you ..

http://www.doesciencegrid.org/Grid/public/events/GPDW/slides/webserver.ppt


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Somkiat Puisungnoen:


This link will help you ..

http://www.doesciencegrid.org/Grid/public/events/GPDW/slides/webserver.ppt


Somkiat,
I don't see any content about the performanace issue of apache and tomcat vs tomcat alone in the link to Power Point slide that you provided... Did you give a wrong link or should it be sthing else other than that link?

I skimmed throught the slides already and it just explains about the nature of apache and tomcat vs tomcat alone... And the internal configuration about them...
Rajan Chinna
Ranch Hand

Joined: Jul 01, 2004
Posts: 320
Bear Bibeault

the only reason to use the Apache hybrid these days is if you require the use of some Apache-only module that is not available with Tomcat.


Can you please explain little bit about the above statement? Is there any major advantages of using Apache which is not found in Tomcat?

Thanks
 
jQuery in Action, 2nd edition
 
subject: Tomcat alone vs Apache/Tomcat