I'm planning to expose few microservices (~20 at this stage) using Spring Boot. I will be creating executable fat jars using the embededed Tomcat. The executable jar will be wrapped in Docker container and deployed to AWS.
In my case 20 jars will have 20 tomcat instances running at the same time. I'm concerned about the overhead of running so many tomcat instances in the production server. Is this a valid concern?
I was wondering if someone has used something similar configuration in production and can share their experience.
Any suggestions will be appreciated.
Thanks JP
We currently use AWS and Spring Cloud / Spring Boot. Our stance is instances that require more resources receive their own EC2 instance. Services that can be deployed using Docker are deployed to Amazon ECS.
All of our deployments are fat jars using embedded Tomcat.
Not knowing the size of what you are calling a service makes this answer a little complicated. If you are worried about Tomcat's overhead why are you running these services in Docker containers? Ease of deployment?
If you do go the route of deploying multiple services to the same Tomcat instance, I would not define your setup as a microservices based configuration.
You may try to deploy all your services (webapps) into one or more tomcat instances. You may not include the Tomcat into war file. Example maven/spring configuration you may find here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With