tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: isolate jvm for each web app possible?
Date Thu, 06 Aug 2009 13:52:17 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

André,

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkp64BEACgkQ9CaO5/Lv0PB6LQCfRdxFq0oXdRXewqNUDkY9Uj73
w0MAoLwCFfn4LCcQf1yCfVDpdSySnoed
=F3KC
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message