Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
James should not shut down immediatly on SIGTERM, but it gracefully terminates connections.
In a kubernetes context for instance:
It might take some time before a component such as kube-proxy or the Ingress controller is notified of the endpoint changes. Hence, traffic might still flow to the Pod despite it being marked as terminated. The app should stop accepting new requests on all remaining connections, and close these once the outgoing queue is drained. If you need a refresher on how endpoints are propagated in your cluster, read this article on how to handle client requests properly.
(Source: https://learnk8s.io/production-best-practices)
I think it also makes sens out of this context.
A graceful shutdown furthermore decrease the risk of inconsistencies in the underlying datastores (Cassandra)