-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kishore,

On 10/19/2009 5:49 AM, M.N.V Kishore wrote:
> Even I too feel the same as having single tomcat instance running on
> multiple ports by adding multiple <Service> tags in server.xml file.

Please note that multiple <Service> elements are not necessary: you can
simply configure multiple <Connector> elements in a single <Service> as
long it is acceptable that all webapps are available on both 8080 and 80.

> Would there by any limitations going further as to opening 'n' number of
> ports on single instance?

There are the obvious limitations of the number of ports available on
your platform (I believe there are 64k ports on most TCP/IP stacks), so
that shouldn't be a problem. Then, your particular user and/or process
may have limits placed on the number of ports you are allowed to open.
This is usually something like 1024 or so, but you'll have to check with
your local system administrator.

Something I ran into when doing load testing is that you can also run
out of file handles when many connections are open (this is all
connections across all <Connector> elements). So, if you have a file
handle limit of, say, 1024, and you have 100 <Connector> elements and
each of them is configured for 10 connections, you have 100 * 10 = 1000
total connections, each of which needs a file handle. Tomcat itself
maintains many open file handles (for things like JAR files, log files,
etc.) and it's very easy to hit the 1024 file handle limit.

This is just an example: you may have many more file handles available
to you, and they are almost certainly configurable so you can increase
them if necessary.

> The reason I am asking all this is we need to implement the same on our
> production server and I need to be aware of any issues that could arise with
> this method?

I would be sure to test this configuration on a separate server before
deploying to production. Always double-check things like resource limits
on the production server before attempting to go live: there's nothing
worse than having to back-out a build to production.

Good luck,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrcfywACgkQ9CaO5/Lv0PCLuwCeNGyRzQxv1dJEuSsRQjZ8OpFi
eEsAoMMaiQDPgLHvXVeg1+ljM3/DZAj6
=13ct
-----END PGP SIGNATURE-----

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

Reply via email to