Updated on 2025-04-25 GMT+08:00

Retry

If the retry option is enabled, the Envoy proxy will retry to connect to the service upon a service access failure, which improves the access quality and success rate.

Configure the YAML file as follows:

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: ratings-route
spec:
  hosts:
  - ratings.prod.svc.cluster.local
  http:
  - route:
    - destination:
        host: ratings.prod.svc.cluster.local
        subset: v1
    retries:                            # Configure retry parameters.
      attempts: 3
      perTryTimeout: 2s
      retryOn: connect-failure,refused-stream,503

You can configure the parameters based on site requirements.