0

Developing a Spring Boot application (with actuator), sometimes the application is so highly loaded ( or "busy", thread pool is exhausted and requests are in a long queue) that liveness probe can easily decided to restart it ( rather than stay in a queue).

I wanna somehow let the application manage it work by itself rather than pod be restarted.

After reading: Specify to Kubernetes when a Pod is "busy" I realized that liveness & readiness probes can help. Unfortunately there is no any clear answer there, so hint me please how can I manage it? Can I somehow switch liveness probe off and play the service is not ready yet as it was from very beginning? And then switch it on back?

Edit: the solution is: management.server.port=8081 OR HPA(Horizontal pod autoscalar) which scale out the pod as traffic increases

J.J. Beam
  • 2,612
  • 2
  • 26
  • 55

1 Answers1

0

I don't think there is any kind of thing that you want to do, better you should have HPA(Horizontal pod autoscalar) which scale out the pod as traffic increases pod count increase and balance the load among those pod. Please do check this link https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

HPA scales out pods based on CPU/memory utilization of your pods.

Dashrath Mundkar
  • 7,956
  • 2
  • 28
  • 42