You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
When a baseplate-serve process receives a SIGTERM, it puts the server
into a graceful shutdown state immediately. New requests are no longer
accepted and the process continues handling in-flight requests until
they're all complete or stop_timeout seconds have elapsed.
Kubernetes won't mark the pod as TERMINATING until the server has
completed its graceful shutdown or has spent long enough shutting down
that it fails to respond to a liveness healthcheck and is forceably shut
down.
During this intervening time, new requests will still be routed to the
pod but the server will not be listening for them. So they get dropped
on the floor.
To prevent this, we add a drain_time period that happens before the
graceful shutdown is kicked off. If configured, a SIGTERM will cause
baseplate-serve to set a global flag indicating shutdown has begun and
then it will wait the specified time until beginning the actual graceful
shutdown. This gives the application a chance to deliberately fail
READINESS healthchecks during that grace period and get taken out of
rotation so that once it starts graceful shutdown it should not be
getting any new requests.
0 commit comments