admin管理员组文章数量:1220948
I wonder what the drawbacks of the Spring Boot application are that it has a /health
actuator endpoint defined as liveness and readiness probes.
Are there any issues related to graceful shutdown or rolling updates?
I wonder what the drawbacks of the Spring Boot application are that it has a /health
actuator endpoint defined as liveness and readiness probes.
Are there any issues related to graceful shutdown or rolling updates?
Share Improve this question asked Feb 7 at 16:32 pixelpixel 26.5k39 gold badges167 silver badges283 bronze badges1 Answer
Reset to default 1Interesting question. I found this answer on Reddit.
Here is the big one that most people miss, though. Handling of SIGTERM events is a must in Kubernetes. Evictions, pod autoscalers, and just regular operation (like kubectl apply ...) can lead to pods getting killed prematurely. This happens by sending a SIGTERM event to the application. The readiness probe MUST respond differently than a liveness probe after the SIGTERM event has been received but before the app is able to exit. The readiness probe must return failure, while the liveness probe must return success. In this way, no new requests are sent to the terminated replica, but existing requests that are currently being processed are able to complete. After the liveness probe returns failure, Kubernetes may send a SIGKILL event, terminating your app immediately. In order for this to be handled properly, your liveness probe MUST remain healthy and your readiness probe MUST return failure. Of course, after the request in flight have been completed, your liveness probe should return failure, but only after all requests in flight have been completed.
本文标签: kubernetesUsing actuatorhealth when Spring application is deployed on k8sStack Overflow
版权声明:本文标题:kubernetes - Using actuatorhealth when Spring application is deployed on k8s? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739305181a2157319.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论