Interview › Istio & Service Mesh
How does Istio support traffic mirroring (shadowing), and why is it useful?
Istio & Service Mesh · Advanced level
Answer
Traffic mirroring, or shadowing, sends a copy of live requests to another destination while the original request still goes to the primary service. It is useful for testing a new version with production-like traffic without affecting user responses.
Technical explanation
Mirrored traffic should not perform real side effects such as charging cards, sending emails, or writing authoritative data unless safely isolated.
The mirrored response is discarded, so it cannot directly affect the user's request.
Mirror percentage and destination must be controlled to avoid overloading the shadow service.
Hands-on example
VirtualService sketch:
route:
- destination:
host: checkout
subset: v1
weight: 100
mirror:
host: checkout
subset: v2
mirrorPercentage:
value: 10Ensure v2 writes to a shadow database or runs in read-only mode before enabling.
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
- What is the role of the holdApplicationUntilProxyStarts setting?
- How do you drain connections gracefully during a rolling update with Istio?
- How do you ensure the sidecar is ready before the app starts taking traffic?
- How do you handle gradual migration of services into mTLS STRICT mode?
- How do you secure the Istio control plane itself?
- What RBAC is needed to manage Istio resources safely?
- 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?