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.

Preparing for an interview?

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

← All Istio & Service Mesh questions