You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chad Wray <ne...@yahoo.com> on 2001/07/30 23:04:43 UTC
Tomcat standalone vs Tomcat w/ Apache
Are there any advantages running Tomcat with Apache
versus running Tomcat standalone and listening on port
80. I am running only *.jsp files on my webserver.
Thanks in advance.
-- Chad Wray
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by Dan Bachelder <ch...@chowda.net>.
tomcat doesn't support apache mods yet does it?
----- Original Message -----
From: "Chad Wray" <ne...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Monday, July 30, 2001 5:04 PM
Subject: Tomcat standalone vs Tomcat w/ Apache
> Are there any advantages running Tomcat with Apache
> versus running Tomcat standalone and listening on port
> 80. I am running only *.jsp files on my webserver.
>
> Thanks in advance.
>
> -- Chad Wray
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Craig R. McClanahan at craigmcc@apache.org wrote:
>
>
> On Mon, 30 Jul 2001, Tim O'Neil wrote:
>
>> At 05:19 PM 7/30/2001, you wrote:
>>> Of course, there are many non-performance-related reasons you might be
>>> required to use Apache in conjunction with Tomcat (if you need the other
>>> functionality that it provides). But, if you don't, you owe it to
>>> yourself to see if Tomcat stand-alone runs fast enough before undertaking
>>> the extra pain it takes to configure them to run together.
>>
>> I don't consider it that painful. It's hardly a pain at all.
>> It involves adding an include to apache's httpd.conf.
>
> That works until you try a servlet mapping in your web.xml file, or a
> security constraint, or a bunch of other things. Current generation
> connectors for Apache (but not mod_webapp under Tomcat 4) totally ignore
> the contents of the web.xml file, so you have to tediously configure
> everything twice.
Currently, mod_webapp forwards _ALL_ requests to tomcat for a given
web-application, but within its structure there's already a hook to parse
the web.xml file and process it...
At the end, I'll be happy to see static files served by Apache (whenever
possible) and all the rest handled by Tomcat...
It's not a big hack, and I am trying to have it working by the next release
of the WebApp module...
But, on the other hand, currently mod_webapp is the only one that is 100%
compliant with the servlet spec... :(
Pier
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 30 Jul 2001, Tim O'Neil wrote:
> At 05:19 PM 7/30/2001, you wrote:
> >Of course, there are many non-performance-related reasons you might be
> >required to use Apache in conjunction with Tomcat (if you need the other
> >functionality that it provides). But, if you don't, you owe it to
> >yourself to see if Tomcat stand-alone runs fast enough before undertaking
> >the extra pain it takes to configure them to run together.
>
> I don't consider it that painful. It's hardly a pain at all.
> It involves adding an include to apache's httpd.conf.
That works until you try a servlet mapping in your web.xml file, or a
security constraint, or a bunch of other things. Current generation
connectors for Apache (but not mod_webapp under Tomcat 4) totally ignore
the contents of the web.xml file, so you have to tediously configure
everything twice.
> You still
> have to do all the configuration stuff in tomcat anyway.
And, in an ideal world, that's all you should ever have to do. More
precisely, you should only have to configure the application once (in
web.xml). But it doesn't normally work that way.
> But I've heard from more than one that Tomcat is faster. So
> there's that. But if security is an issue for you I have a hard
> time believing that Tomcat is as secure as Apache.
>
I'd sure be interested in what metrics you are using to measure "more
secure".
Craig
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by Tim O'Neil <bw...@noteboard.org>.
At 05:19 PM 7/30/2001, you wrote:
>Of course, there are many non-performance-related reasons you might be
>required to use Apache in conjunction with Tomcat (if you need the other
>functionality that it provides). But, if you don't, you owe it to
>yourself to see if Tomcat stand-alone runs fast enough before undertaking
>the extra pain it takes to configure them to run together.
I don't consider it that painful. It's hardly a pain at all.
It involves adding an include to apache's httpd.conf. You still
have to do all the configuration stuff in tomcat anyway.
But I've heard from more than one that Tomcat is faster. So
there's that. But if security is an issue for you I have a hard
time believing that Tomcat is as secure as Apache.
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Dmitri Colebatch at dim@bigpond.net.au wrote:
> Pier,
>
> On Tue, 31 Jul 2001, Pier P. Fumagalli wrote:
>> Well, to be completely honest, and being the author of 2 out of 3 apache
>> connectors to Tomcat, I am a _BIG_ fan of using Tomcat in stand-alone mode.
>> Unless you don't specifically require some of the Apache functionalities,
>> run it stand alone, might be slightly slower in some cases, but far more
>> stable.
>
> really? wow... ok, I'll ask a question then - what would your preferred
> approach be for having tomcat listen on port 80? squid accelerator? I'm
> assuming you're not running tomcat as root?
Nope, I'm not... Currently there's a test project to run Tomcat 4.0 as a
native daemon in Unix. You can check out and build the "service" code in the
"jakarta-tomcat-4.0/service" CVS repo, and try it out.
I'm building a new (more portable) API in "jakarta-tomcat-service", and that
will be (probably) the default way to invoke Tomcat from the next beta.
Both of them (the one in TC4 and the new Service) allow to run TC4 as an
operating-system daemon, binding to port 80 and running as a non-root
user... I don't know whether those will be adopted by TC3 also or not, but
they _do_ work :)
Pier
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by Dmitri Colebatch <di...@bigpond.net.au>.
Pier,
On Tue, 31 Jul 2001, Pier P. Fumagalli wrote:
> Well, to be completely honest, and being the author of 2 out of 3 apache
> connectors to Tomcat, I am a _BIG_ fan of using Tomcat in stand-alone mode.
> Unless you don't specifically require some of the Apache functionalities,
> run it stand alone, might be slightly slower in some cases, but far more
> stable.
really? wow... ok, I'll ask a question then - what would your preferred
approach be for having tomcat listen on port 80? squid accelerator? I'm
assuming you're not running tomcat as root?
cheesr
dim
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Craig R. McClanahan at craigmcc@apache.org wrote:
> On Mon, 30 Jul 2001, Richard Draucker wrote:
>
>> The following is a cut'n paste from "tomcat/doc/uguide/tomcat_ug.html".
>> If you have tomcat installed, look for this doc and provide this text to your
>> sys admin.
>>
>> Setting Tomcat to Cooperate with the Apache Web Server
>> Tomcat is not as fast as Apache when it comes to static pages. Tomcat is not
>> as configurable as Apache. Tomcat is not as robust as Apache.
>>
>
> Don't believe everything you read ... even in the Tomcat docs :-).
>
> There is no cut-and-dried answer whether Tomcat standalone or
> Tomcat+Apache will run faster for *you*. There are far too many variables
> for simplistic answers to always be accurate. The best thing to do is try
> your application both ways and see.
>
> Just a few examples of how real life confounds answering a question
> like this: :-)
> [...]
Well, to be completely honest, and being the author of 2 out of 3 apache
connectors to Tomcat, I am a _BIG_ fan of using Tomcat in stand-alone mode.
Unless you don't specifically require some of the Apache functionalities,
run it stand alone, might be slightly slower in some cases, but far more
stable.
Actual improvements can be achieved using JNI and a multi-threaded
web-server such as Apache 2.0, but AFAIK, for Tomcat 4.0 we're still far
from that... :(
Ok, I'm working on it :) :)
Pier
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 30 Jul 2001, Richard Draucker wrote:
> The following is a cut'n paste from "tomcat/doc/uguide/tomcat_ug.html".
> If you have tomcat installed, look for this doc and provide this text to your
> sys admin.
>
> Setting Tomcat to Cooperate with the Apache Web Server
> Tomcat is not as fast as Apache when it comes to static pages. Tomcat is not
> as configurable as Apache. Tomcat is not as robust as Apache.
>
Don't believe everything you read ... even in the Tomcat docs :-).
There is no cut-and-dried answer whether Tomcat standalone or
Tomcat+Apache will run faster for *you*. There are far too many variables
for simplistic answers to always be accurate. The best thing to do is try
your application both ways and see.
Just a few examples of how real life confounds answering a question
like this: :-)
* Many web applications written with servlets and JSP pages are
95-100% dynamic content. If your app is like that, static file
serving speed is not relevant, or may not be significant enough
to make any difference in overall response time.
* Under normal circumstances, thre *browser* will cache static files.
If it does so, the fact that Apache might also do so is not relevant
as long as Tomcat sends back the "Not Modified" response correctly
(Tomcat 4 does this, for example, with zero disk accesses).
* You don't want Apache caching the output from dynamic resources
(servlets and JSP pages), because the whole point of them is that
the contents will change.
* You can, in your servlet/JSP page, implement the getLastModified()
method yourself to let the browser cache your dynamic pages. This is
very useful for "dynamic" pages that don't change very often.
Of course, there are many non-performance-related reasons you might be
required to use Apache in conjunction with Tomcat (if you need the other
functionality that it provides). But, if you don't, you owe it to
yourself to see if Tomcat stand-alone runs fast enough before undertaking
the extra pain it takes to configure them to run together.
Craig McClanahan
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by Richard Draucker <ri...@draucker.com>.
The following is a cut'n paste from "tomcat/doc/uguide/tomcat_ug.html".
If you have tomcat installed, look for this doc and provide this text to your
sys admin.
Setting Tomcat to Cooperate with the Apache Web Server
Tomcat is not as fast as Apache when it comes to static pages. Tomcat is not
as configurable as Apache. Tomcat is not as robust as Apache.
On Monday 30 July 2001 05:59 pm, you wrote:
> What? using Apache with Tomcat will increase the performance for static
> pages? Well, my admin told me the opposite, she said the browser
> "hesitated" for a fraction of a second and then the static pages got load
> up when using Apache + Tomcat. So she wanted to use Tomcat standalone
> instead. So how come there is an increase in performance? Please help me to
> convice my admin to use both Apache and Tomcat. Thanks much in advance.
>
> T.
>
> Srinivas Reddy wrote:
> > Also there is an increase in performance for static files like .html and
> > static images.
> >
> > -srini
> > ----- Original Message -----
> > From: "Tim O'Neil" <ti...@xythos.com>
> > To: <to...@jakarta.apache.org>
> > Sent: Monday, July 30, 2001 2:27 PM
> > Subject: Re: Tomcat standalone vs Tomcat w/ Apache
> >
> > > At 02:04 PM 7/30/2001, you wrote:
> > > >Are there any advantages running Tomcat with Apache
> > > >versus running Tomcat standalone and listening on port
> > > >80. I am running only *.jsp files on my webserver.
> > >
> > > Added security if you use Apache.
--
Richard Draucker richard@protected-data.com
Protected-Data.Com www.protected-data.com
Remote Data Support For Web Developers
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by Tsinwah Lee <tl...@gmu.edu>.
What? using Apache with Tomcat will increase the performance for static
pages? Well, my admin told me the opposite, she said the browser "hesitated"
for a fraction of a second and then the static pages got load up when using
Apache + Tomcat. So she wanted to use Tomcat standalone instead. So how come
there is an increase in performance? Please help me to convice my admin to
use both Apache and Tomcat. Thanks much in advance.
T.
Srinivas Reddy wrote:
> Also there is an increase in performance for static files like .html and
> static images.
>
> -srini
> ----- Original Message -----
> From: "Tim O'Neil" <ti...@xythos.com>
> To: <to...@jakarta.apache.org>
> Sent: Monday, July 30, 2001 2:27 PM
> Subject: Re: Tomcat standalone vs Tomcat w/ Apache
>
> > At 02:04 PM 7/30/2001, you wrote:
> > >Are there any advantages running Tomcat with Apache
> > >versus running Tomcat standalone and listening on port
> > >80. I am running only *.jsp files on my webserver.
> >
> > Added security if you use Apache.
> >
> >
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by Srinivas Reddy <sr...@ensoftek.com>.
Also there is an increase in performance for static files like .html and
static images.
-srini
----- Original Message -----
From: "Tim O'Neil" <ti...@xythos.com>
To: <to...@jakarta.apache.org>
Sent: Monday, July 30, 2001 2:27 PM
Subject: Re: Tomcat standalone vs Tomcat w/ Apache
> At 02:04 PM 7/30/2001, you wrote:
> >Are there any advantages running Tomcat with Apache
> >versus running Tomcat standalone and listening on port
> >80. I am running only *.jsp files on my webserver.
>
> Added security if you use Apache.
>
>
Re: Tomcat standalone vs Tomcat w/ Apache
Posted by Tim O'Neil <ti...@xythos.com>.
At 02:04 PM 7/30/2001, you wrote:
>Are there any advantages running Tomcat with Apache
>versus running Tomcat standalone and listening on port
>80. I am running only *.jsp files on my webserver.
Added security if you use Apache.