Interview › Istio & Service Mesh
How do you drain connections gracefully during a rolling update with Istio?
Istio & Service Mesh · Advanced level
Answer
To drain connections gracefully during a rolling update, I coordinate Kubernetes termination settings, application shutdown, Envoy drain duration, readiness removal, and load-balancer behavior. The pod should stop receiving new traffic before the app exits, while existing requests complete where possible.
Technical explanation
Readiness should fail first so Kubernetes removes the pod from endpoints.
The app should stop accepting new work and complete in-flight requests.
Envoy should drain downstream connections within terminationGracePeriodSeconds.
Hands-on example
Runbook:
1. Configure app graceful shutdown on SIGTERM.
2. Set terminationGracePeriodSeconds to 30-60s or workload-specific value.
3. Use preStop if needed to give endpoint removal time.
4. Configure proxy drain duration if required.
5. Load test a rolling update and verify no 5xx spike.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Istio & Service Mesh interview questions
- How do you ensure the sidecar is ready before the app starts taking traffic?
- What is the role of the holdApplicationUntilProxyStarts setting?
- How does Istio support traffic mirroring (shadowing), and why is it useful?
- How do you handle gradual migration of services into mTLS STRICT mode?
- How do you test an AuthorizationPolicy before enforcing it (dry-run)?
- How do you secure the Istio control plane itself?
- How do you observe and reduce the error rate of a specific service via the mesh?
- What RBAC is needed to manage Istio resources safely?