Reputation: 436
Here is example of VirtualService, using both timeout and retries.
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: sa-logic
spec:
hosts:
- sa-logic
http:
- route:
- destination:
host: sa-logic
subset: v1
weight: 50
- destination:
host: sa-logic
subset: v2
weight: 50
timeout: 8s
retries:
attempts: 3
perTryTimeout: 3s # perTryTimeout (3s) is different from timeout above (8s)
How it works? The documentation does not provide clear answers to this question. I have three guesses:
Upvotes: 2
Views: 4446
Reputation: 13898
This is correct:
- Timeout per try always 3s (including initial call), but the total timeout for all attempts is 8s.
It basically means that:
An attempt is marked as failed if it takes longer than 3 seconds.
There are going to be a maximum of 3 attempts.
The overall waiting time for a successful attempt will not be longer than 8 seconds.
perTryTimeout
* retries
should not exceed the global timeout
. If it does, the retry attempts that fall outside the global timeout will be ignored.
Upvotes: 7