
Signature
Davide Consonni <davideconsonni@virgilio.it> http://csvtosql.sourceforge.net
Un padre e' un banchiere fornito dalla natura.
> > In stand-alone mode, Tomcat can process servlets (and JSPs) and can
> > serve static content as well... And it does it *very* fast.
Second that.
> ok, but apache httpd is faster than tomcat and has a better virtual host
> management.
> usually people but tomcat behind apache with a connector ..
Bet you can't find supporting data for that (usually people put tomcat
behind apache with a connector). My bet would be that most small to
mid-sized sites don't. I have situations with both (actually I have a
third scenario with IIS in front of Tomcat as well) and see no
significant difference in response times. Then again I'm only talking
about dealing out thousands of pages a day. I'm sure that in a
high-volume app that would be different.
I prefer the all Tomcat solution myself where it fits (which would be
most cases).
But to respond to the OP:
Apache is webserver only. Use it for HTML, SHTML, images, etc. With the
exception of SSI, this is static stuff. For dynamic stuff (like PHP,
Perl, Servlets, etc.) it needs help from other programs.
Tomcat is a servlet container. Use it for JSP, Servlets (and if you
want, all the stuff Apache does).
JBoss is an application server. Use it if your application uses
Enterprise JavaBeans.
Arne Vajhøj - 06 Sep 2006 17:57 GMT
>> ok, but apache httpd is faster than tomcat and has a better virtual host
>> management.
[quoted text clipped - 7 lines]
> about dealing out thousands of pages a day. I'm sure that in a
> high-volume app that would be different.
I would expect huge files to be sligthly faster in
Apache or IIS than by Tomcat.
Else the only reason for a speedup would be the
use of HTTPS where Apache or IIS are using a hardware
SSL accelerator.
Arne
Robert Klemme - 07 Sep 2006 09:01 GMT
> I would expect huge files to be sligthly faster in
> Apache or IIS than by Tomcat.
Why do you expect that? I'd rather expect the opposite because the time
for streaming a large file from disk to network is mostly determined by
IO and network bandwidth whereas for smaller files the overhead of HTTP
header processing etc. would make up a greater portion of overall
timing. Are there any optimizations in apache (caching the whole file?)
that will make it faster on large files?
Kind regards
robert
Arne Vajhøj - 09 Sep 2006 05:56 GMT
>> I would expect huge files to be sligthly faster in
>> Apache or IIS than by Tomcat.
[quoted text clipped - 5 lines]
> timing. Are there any optimizations in apache (caching the whole file?)
> that will make it faster on large files?
My basis is practical. If Apache performs poorly for big
files, then users complain and it get fixed. If Tomcat performs
poorly for big files, then no users complain, because no users
uses Tomcat for that, so it never get fixed.
I did a simple test. One full size CD image. 10 downloads
singlethreaded.
Apache 2.0 - 155 seconds
Tomcat 5.5 - 185 seconds
Practically default config on both.
It does not prove anything, because there are a bazillion
possible test scenarios and test configs and not really
a way to say what is most correct.
But it did at least not prove my hypothesis wrong.
Arne
David Segall - 06 Sep 2006 18:22 GMT
>Tomcat is a ... and if you want, all the stuff Apache does.
Is that really true? Can I use Tomcat as a front end for PHP, Perl
etc? Does it have similar facilities for limiting access?
Mark Space - 06 Sep 2006 22:10 GMT
>> Tomcat is a ... and if you want, all the stuff Apache does.
> Is that really true? Can I use Tomcat as a front end for PHP, Perl
> etc? Does it have similar facilities for limiting access?
I'm not an Apache expert, and I doubt Tomcat will really do *all* that
Apache does. But Tomcat definitely has facilities for limiting user
access based on user roles, and for hiding scripts and other back-end
components from all users.