You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matt Raible <MR...@RESORTQUEST.com> on 2003/09/04 21:47:24 UTC

Tomcat and multiple processors

We are getting ready to deploy a number of applications to Tomcat - I'm
pretty familiar with Tomcat and Java, but have a couple of questions:

1.  Does it support multiple processors?  We have a Tomcat instance in
production on a NT box with 4 processors, but Tomcat only seems to use one.
Does the 1.4.2 JVM support MP?

2.  We have IIS on the front end, and we are currently not able to migrate
to Apache.  We'd like to use the connectors (jk or jk2) to do load-balancing
and failover.  Do these connectors provide the support we need?  Should be
use a clustering architecture like JavaSpaces
(http://www.onjava.com/lpt/a/2422) instead?

3.  We plan on deploying 42+ applications to a number of Tomcat servers.
Since each application will support 1 customer - I think it's a good idea to
have 1 app -> 1 tomcat - so if Tomcat crashes, it only affects that customer
- rather than all customers.  I've heard of setting up a CATALINA_BASE to
share Tomcat's core files, and then setup webapps directories for each
customer.  Does this sound reasonable?  Have have others done something like
this?

Thanks,

Matt

Re: Tomcat and multiple processors

Posted by John Turner <to...@johnturner.com>.
Matt Raible wrote:

> 1.  Does it support multiple processors?  We have a Tomcat instance in
> production on a NT box with 4 processors, but Tomcat only seems to use one.
> Does the 1.4.2 JVM support MP?

Yes, at least on Sun hardware with Solaris 8, and Intel hardware with RH
Linux 7.x (duals only...we don't have quads).  Don't know about Windows.

> 2.  We have IIS on the front end, and we are currently not able to migrate
> to Apache.  We'd like to use the connectors (jk or jk2) to do load-balancing
> and failover.  Do these connectors provide the support we need?  Should be
> use a clustering architecture like JavaSpaces
> (http://www.onjava.com/lpt/a/2422) instead?

The connectors can load balance, but unfortunately the IIS versions are
sort of a crapshoot in my mind.

> 3.  We plan on deploying 42+ applications to a number of Tomcat servers.
> Since each application will support 1 customer - I think it's a good idea to
> have 1 app -> 1 tomcat - so if Tomcat crashes, it only affects that customer
> - rather than all customers.  I've heard of setting up a CATALINA_BASE to
> share Tomcat's core files, and then setup webapps directories for each
> customer.  Does this sound reasonable?  Have have others done something like
> this?

I agree with Yoav. All the way back with Tomcat 3.1 we had ours setup
this way:

1 virtual host = 1 Tomcat instance = 1 VM = 1 application

We've had a couple dozen set up like this for a long time, works like a
charm.  I prefer this over using CATALINA_BASE, as I can treat each
virtual host separately from any other, including giving each different
JVM memory settings, etc.  Admittedly, we're an ASP, so we can dictate
how many web apps go with each virtual host, but I would think having
completely separate Tomcat instances would make sense in most real
production environments.  The only thing you "lose" with multiple Tomcat
instances is disk space, and disk is cheap.

John