Traffic Policies — traffic management rules.
1. Traffic Splitting:
1apiVersion: networking.istio.io/v1beta12kind: VirtualService3spec:4 hosts: [myapp]5 http:6 - route:7 - destination:8 host: myapp9 subset: v110 weight: 8011 - destination:12 host: myapp13 subset: v214 weight: 20
2. Retries and Timeouts:
1spec:2 hosts: [myapp]3 http:4 - timeout: 10s5 retries:6 attempts: 37 perTryTimeout: 2s8 retryOn: 5xx,reset,connect-failure
3. Circuit Breaking:
1apiVersion: networking.istio.io/v1beta12kind: DestinationRule3spec:4 host: myapp5 trafficPolicy:6 outlierDetection:7 consecutive5xxErrors: 58 interval: 30s9 baseEjectionTime: 30s
4. Fault Injection:
1spec:2 http:3 - fault:4 delay:5 percentage:6 value: 107 fixedDelay: 5s8 abort:9 percentage:10 value: 511 httpStatus: 503
5. Header-based Routing: match headers → route to subset.