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.
More on Reliability & Rollouts
What are the must-have settings for a production Deployment?BeginnerWhy use image digests or immutable tags instead of `latest`?BeginnerWhat does a PodDisruptionBudget protect and how do you size it?BeginnerHow do you set graceful shutdown right?BeginnerWhy do rollouts sometimes cause brief 502/503 errors?BeginnerHow many replicas should you run and how do you spread them?Beginner