1

How to automatically scale up and scale down of micro services instances built using Spring Boot and Spring cloud?

I didn't find much info about this on web.

please help in understanding the possible approaches

Riding Cave
  • 1,029
  • 1
  • 15
  • 32

1 Answers1

0

If this is not provided by your environment (i.e. AWS Lambda) then you probably have to do it yourself.

For this you need a method of programatically scaling up/down the microservices (i.e. docker service scale xyz=2) and a meaning of determining that a service needs scaling up/down. For this you need to be able to read the relevant metrics from the microservice and a scaling controller that use those metrics to compute the scaling reguirements. For example, if the CPU usage is at least 90% for at least 5 seconds then scale up, if the CPU is less than 10% for at least 5 seconds then scale down.

You can even design the microservice to report its own metrics to the controller for more business specific metrics.

Constantin Galbenu
  • 16,951
  • 3
  • 38
  • 54