Interview Prep/Kubernetes/Reliability & Rollouts

How would you handle zero-downtime for long-lived connections (WebSockets, gRPC)?

IntermediateProductionReliability & Rollouts
Answer

Long connections do not rebalance on their own: set a generous terminationGracePeriodSeconds, send a close/GOAWAY on SIGTERM so clients reconnect, use connection max-age on the proxy, and use client-side load balancing or a mesh for gRPC (an L4 Service pins connections to one Pod). Rollouts use maxSurge for headroom.

All Kubernetes questions

More on Reliability & Rollouts