Closed veckatimest closed 4 months ago
(use na when API docs (Release notes, etc) do not need to be updated)
According to this blog post (and some others) https://blog.risingstack.com/graceful-shutdown-node-js-kubernetes/ We should handle SIGTERM to finish handling express requests, close server and then shutdown. Even if the pod will not shutdown instantly, it'll change it's readiness probe status, which will stop incoming requests. So this should help us finish current activities. https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-terminating-with-grace This article says that once pod is marked for deletion, it's excluded from Services. https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/ and this article says that default value for terminationGracePeriodSeconds is 30 seconds.
terminationGracePeriodSeconds
So this solution
Put screenshots or response/request examples here!
Write any more ideas you have
ā DoD
(use na when API docs (Release notes, etc) do not need to be updated)
š Summary
According to this blog post (and some others) https://blog.risingstack.com/graceful-shutdown-node-js-kubernetes/ We should handle SIGTERM to finish handling express requests, close server and then shutdown. Even if the pod will not shutdown instantly, it'll change it's readiness probe status, which will stop incoming requests. So this should help us finish current activities. https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-terminating-with-grace This article says that once pod is marked for deletion, it's excluded from Services. https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/ and this article says that default value for
terminationGracePeriodSeconds
is 30 seconds.So this solution
šø Examples
Put screenshots or response/request examples here!
š Problems
š” More ideas
Write any more ideas you have