I have a more than 50 different microservices written in java and using spring boot. All of them are running in a docker container and are deployed to a k8 cluster on Openshift.

Most of the time these microservices are idle and not used in the same time even though all of them are running all the time. My problem is that their startup time is very slow (can go up to a few minutes) because I choose not give them a lot memory and CPU (limit of 200mVCPU and 400M of memory). I do this because they are 99 percent of the time are idle and even when they are not they do not require a lot of memory and CPU except from their startup.

I feel like I am missing something in the way I am managing all of these microservices or I have something terribly wrong in my code that makes them this slow.

I thought about upgrading to spring boot 3.0 and trying spring native but it might take some time for us to upgrade to this. Is there ant other suggestions? Docker training - HKR Trainings