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 here).

- 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


-- 
Signatur
Tarek Ahmed
Softwareentwicklung


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

Tel.: +49 221 4724-268
Fax: +49 221 4724-444
tarek.ah...@dimdi.de <mailto:tarek.ah...@dimdi.de>
www.dimdi.de <https://www.dimdi.de>

tick    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).

Reply via email to