Interview › Istio & Service Mesh
How do you do weighted traffic splitting for a canary release in Istio?
Istio & Service Mesh · Basic level
Answer
Weighted traffic splitting is done with a VirtualService that sends percentages of traffic to different DestinationRule subsets. For a canary, I might route 95 percent to v1 and 5 percent to v2, observe metrics, then gradually increase v2.
Technical explanation
The DestinationRule defines subsets such as v1 and v2 based on pod labels.
The VirtualService assigns integer weights to each subset, and the weights should add up to 100.
Canary decisions should be based on error rate, latency, saturation, and business metrics rather than time alone.
Hands-on example
Canary example:
http:
- route:
- destination:
host: checkout
subset: stable
weight: 95
- destination:
host: checkout
subset: canary
weight: 5
Watch:
$ kubectl -n istio-system port-forward svc/prometheus 9090
Query istio_requests_total and request duration by destination_version.
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 Istio, and what are the core capabilities it provides?
- What is the difference between the Istio control plane and data plane?
- What is istiod, and what does it do?
- What is Envoy, and what role does it play in Istio?
- What is the sidecar pattern, and how does Istio inject the proxy?
- How does automatic sidecar injection work (namespace label, webhook)?
- What is the Istio ambient (sidecarless) mode, and how does it differ from sidecar mode?
- What is the difference between ztunnel and a waypoint proxy in ambient mode?