tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "PURVIS, Robert (NHS DIGITAL)" <>
Subject RE: Number of Web Applications in one Tomcat
Date Mon, 29 Oct 2018 08:49:35 GMT
We have had a single tomcat with multiple applications (10 or more) for many years (since 2002),
and are now separating them. The main reason being that when one application crashes it can
bring down the whole tomcat (e.g. oom errors).

Robert Purvis<>

From: Ahmed, Tarek <>
Sent: 29 October 2018 08:00
Subject: Number of Web Applications in one Tomcat

Hi all,

TLDR? Do you deploy one web application per tomcat instance or several?


The long story:

I'd like to sound out your opinion regarding the number of web applications deployed in one
tomcat instance. The reason is, that at my place of work the developers prefer one webapp
per tomcat, the admins would rather have as many webapps as possible in one tomcat instance
(yeah, that's devops at its finest ;-)  ). As a developer I'm probably prejudiced, but the
argument goes as follows:

OPS (one tomcat, many webapps):

- Saves memory (each tomcat has a memory footprint even without a web application running)

- Saves extra file systems for each tomcat (logs, tomcat installation, temp directory)

- Saves nagios monitoring configuration

- Saves separate ports (security considerations)

- Saves work distributing security patches

DEV (one webapp per tomcat)

- Start-up time of "fat tomcats" multiplies, which leads to worsened availablity (e.g., our
fattest tomcat contains 32 web services. It takes 4 minutes to start)

- If one webapp goes haywire, it may crash the rest of them (OOM, no more threads, etc.)

- For bug fixes in one application, you may need to restart the complete tomcat instance.
Auto (re)deploy takes you only so far, since loaded classes may not always be unloaded cleanly,
threads not closed etc. This is not always something that can be solved in your own code,
third party libraries may cause problems, too (we had some issues with quartz and infinispan

- If you ever need to profile your application in production, there is much less noise when
analysing heap, thread dumps, cpu usage etc.

- I might even think there is some improved security if webapps are isolated in several processes
vs. being deployed in one VM (security arguments always work well with OPS :-)  )

So, I want to get away from the one-tomcat-multiple-webapps scenario. One thing I started
doing to subvert this policy is using spring boot with embedded tomcats which is cool in a
lot of ways but not always feasible.

What are your practices? Are there further pros and cons for one way or the other? Thanks
so much for any input,

many greetings,


Tarek Ahmed

Deutsches Institut für
Medizinische Dokumentation und Information
Waisenhausgasse 36-38a
50676 Köln

Tel.: +49 221 4724-268
Fax: +49 221 4724-444<><>


Das DIMDI unterstützt die Vereinbarkeit von Beruf und Familie und ist entsprechend zertifiziert.

Das DIMDI ist ein Institut im Geschäftsbereich des Bundesministeriums für Gesundheit (BMG).


This message may contain confidential information. If you are not the intended recipient please
inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in
relation to its contents. To do so is strictly prohibited and may be unlawful. Thank you for
your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and
Scotland. NHSmail is approved for exchanging patient data and other sensitive information
with NHSmail and other accredited email services.

For more information and to find out how you can switch,

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message