Answer the question
In order to leave comments, you need to log in
Jetty: embedded vs standalone with microservice architecture?
Hello! Newbie in Java.
I have several Java processes (written in Spring) that are independent of each other. Each process must handle multiple http requests. So far, I've built embedded Jetty into every process for development.
But there is a concern that in production it will be too wasteful to have a Jetty owl embedded in each process. Perhaps it makes sense to set up a common jetty for everyone?
Please share your experience, what's the right way? Thanks in advance!
Answer the question
In order to leave comments, you need to log in
How many processes are we talking about and what is meant by "wasteful" - the number of classes loaded into memory, the amount of memory for each process?
Uber Jar with embedded Jetty and custom classes weighs ~10-12Mb. If there are 5-10 such processes, then I would not worry, if there are 30, then I think it's worth using Jetty as a regular container.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question