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

6/15/2018

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 ?

-- SeB.Fr
google-kubernetes-engine
istio

1 Answer

4/10/2019

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
-- erick
Source: StackOverflow