Interview › Istio & Service Mesh
What is the impact of the sidecar on application startup and shutdown ordering?
Istio & Service Mesh · Advanced level
Answer
The sidecar can affect startup and shutdown because the application may start before Envoy is ready, or terminate before Envoy finishes draining connections. If not handled, this can cause early request failures during startup or dropped in-flight requests during rolling updates.
Technical explanation
Startup ordering matters when the app immediately calls dependencies or receives traffic as soon as its container starts.
Shutdown ordering matters for long-lived HTTP/gRPC connections and graceful termination.
Readiness probes, preStop hooks, terminationGracePeriodSeconds, and Istio proxy lifecycle settings should be coordinated.
Hands-on example
Practical setup:
1. Enable holdApplicationUntilProxyStarts for sensitive workloads.
2. Ensure Kubernetes readiness waits for the app and proxy.
3. Add preStop sleep or graceful shutdown in app.
4. Set terminationGracePeriodSeconds long enough for Envoy drain plus app cleanup.
5. Test rolling update under live traffic.
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 handle gradual migration of services into mTLS STRICT mode?
- How do you ensure the sidecar is ready before the app starts taking traffic?
- How do you drain connections gracefully during a rolling update with Istio?
- What is the role of the holdApplicationUntilProxyStarts setting?
- How does Istio support traffic mirroring (shadowing), and why is it useful?
- How do you test an AuthorizationPolicy before enforcing it (dry-run)?
- How do you observe and reduce the error rate of a specific service via the mesh?
- What is the difference between L4 and L7 policy enforcement in the mesh?