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