Graceful listener draining during rolling deploys
Rolling restarts drop traffic when load balancers continue routing connections to a process that has already closed its listening socket. Health status and socket draining need a deliberate handoff window.
Mark readiness false first, wait briefly for upstream health checks to observe the transition, and then invoke graceful server shutdown so existing HTTP/2 streams receive GOAWAY cleanly.
Bound total drain time with a hard deadline shorter than the supervisor kill timeout. A single wedged client should never stall an entire deployment wave.
Record connection termination causes separately from application errors so deploy windows remain clear in dashboards.