P
P
piatachki2017-07-12 14:13:35
Java
piatachki, 2017-07-12 14:13:35

What is more profitable - built-in Tomcat or a separate one?

Just started learning about Spring, specifically the Spring-boot framework. Due to insufficient depth of knowledge, I can’t imagine the mechanics of the container. I pack embedded tomcat into an executable jar and run it on the server. It turns out that on the server (Ubuntu 16.04) several copies of tomcat are spinning - according to the number of running applications. Very resource-intensive, in particular in terms of memory consumption.
If you pack in war and deploy several applications on standalone tomcat, will there be a gain in resource consumption, all other things being equal? Will one tomcat instance serving several applications work in this case, or will several copies still actually run?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
protven, 2017-07-12
@piatachki

You make a typical beginner's mistake, instead of learning spring, you start to wonder
- "What is more profitable <here is some abstract question that needs to be resolved already in a combat project>".
In general, this is such a variant of the manifestation of procrastination.
Do you currently have a memory deficit when deploying? If yes, then buy more memory, it costs a penny or do not run many instances of the application and continue to learn spring.
If not, then continue to learn the spring.
PS There is a difference, and it is in favor of one Tomkat for several applications. But the difference is negligible. Using embedded servlet containers is more beneficial in terms of micro-service architecture. But you don't need it now.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question