Bruno Melloni wrote:
- Since all of the embedded Tomcat instances will use the same version, is it possible for them to share the Tomcat code even as they have independent memory spaces for the apps? It seems wasteful to load so many copies of the same read-only thing. Same thing for Java itself, it would be even crazier to have to include a separate copy of Java for each webapp.
- What is the best way to deploy? Googling seems to point to using a container, and more specifically to deploy the embedded Tomcat Spring Boot apps on Docker.
- Is Docker included in the Windows Server license? Googling seems to hint so... but it is not clear.
I apologize if these are truly noob questions but google did not help, if anything it added to the confusion as every tutorial seems to be lobbying to sell you a tool instead of helping you choose the best fit.
Also, if going the Spring Boot way is overkill... please say so. Simpler is always better, if there is such a way.
Spring Boot aims to be a self-contained java application, with every dependency packaged into a single, fat jar file.
Including Tomcat runtime as Web Application Server, or Jetty, if you tell Spring Boot to use it. Jetty should have a reduced memory footprint with respect to Tomcat, but there's no huge saving in term of memory. If you deploy your applications as standalone boot application, you'll end to have
n Tomcat runtimes running all together on your server. So, yes, IMHO your concerns are right, things may be even worse with respect to memory consumption. On the other hand, splitting a monolithic installation in several, separated standalone apps will bring undoubtly some advantages: there would be nothing like a "general crash" of all your apps, because each of them work separately.
When dealing with Spring Boot applications, Docker is definitely a way to go. It's quite simple to dockerize a spring boot application, and there are plenty of tutorials on the way teaching you how to proceed. You won't save memory anyway - a containerized application requires the same memory as before.
With docker, anyway, it's really much more simple to manage your running application and to set-up them to automatically restart if any crashes.
About licenses: AFAIK, Docker community edition is free for use. Don't know anything about Enterprise edition, which I suppose will required a regulard, paid subscriptions.
But for a starter, using CE editoin should be enough.