tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: isolate jvm for each web app possible?
Date Thu, 06 Aug 2009 13:52:17 GMT
Hash: SHA1


On 8/6/2009 5:24 AM, André Warnier wrote:
> If you want to really separate the webapps from one another, you have to
> run them in separate Tomcats, which in turn would run under separate JVMs.

More specifically, see the RUNNING.txt file that comes with Tomcat.
There is a section in there called "Advanced Configuration - Multiple
Tomcat Instances".

We segregate our 4 webapps in this way and it works very well for us.
Some things to remember:

1. Since only one process can bind to an IP/port combination, you will
need some type of front controller configured to route requests to the
proper Tomcat instance. We use Apache httpd + mod_jk to map URL patterns
(like /webapp1 -> tomcat1, /webapp2 -> tomcat2).

You will have to be very careful about port assignments, since each
Tomcat instance needs at least 1 port for requests (like 8080 or
whatever) as well as a shutdown port (which you can disable if you
choose) and these need to be unique across all your instances. So, if
you need 4 Tomcats, you need 8 ports allocated. I recommend you
establish a convention such as Tomcat 1 = 8001,9001, Tomcat 2 =
8002,9002 or something like that just to keep your sanity.

2. More JVMs means larger memory requirements. A Sun 1.5+ JVM will help,
as some of this memory is shared, but you'll still need a bunch of
memory to hold all those heaps. Our 4 (modest) webapps fit comfortably
inside 2GiB of memory.

Good luck,
- -chris
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message