M
M
mitaichik2017-03-03 16:11:53
Java
mitaichik, 2017-03-03 16:11:53

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

1 answer(s)
E
Eugene Khrustalev, 2017-03-03
@mitaichik

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 question

Ask a Question

731 491 924 answers to any question