SeB.Fr
SeB.Fr

Reputation: 1344

istio retry fails to work or I don't understand it?

I have setup the bookinfo demo and create a details VirtualService with some retries rules like this

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: details
spec:
  hosts:
  - details
  http:
  - route:
    - destination:
        host: details
    retries:
      attempts: 3
      perTryTimeout: 5s

I am killing the details pods and try to curl the following route from inside the mesh

curl -I http://details:9080/health

and I was hoping that the rule would make the request to try 3 times and wait for 5 seconds between each try but I immediatly get a 503 http response. I there something I wrongly understand and if yes, is it possible to cope with pods failure by queuing/retrying the requests somehow ?

Upvotes: 2

Views: 863

Answers (1)

erick
erick

Reputation: 21

the default retry policy is "connect-failure,refused-stream,unavailable,cancelled,resource-exhausted,retriable-status-codes".

you may set

retries:
      attempts: 3
      perTryTimeout: 5s
      retryOn: 5xx

Upvotes: 2

Related Questions