I installed istio v1.20.1 on my minicube. Also I have a go-client service that makes a request to go-server. If go-server returns code 425, I need to retry request after N seconds taken from the retry-after header
I'm trying to do this through a virtual-service, and an envoy-filter that will patch it.
So I have a virtual-service for go-server:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: go-server-virtual-service
labels:
app: go-server
spec:
hosts:
- go-server-service
http:
- route:
- destination:
host: go-server-service
retries:
attempts: 4
perTryTimeout: 2s
retryOn: "425"
and envoy-filter for go-client:
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: retry-after-envoy-filter
spec:
workloadSelector:
labels:
app: go-client
configPatches:
- applyTo: HTTP_ROUTE
match:
context: SIDECAR_OUTBOUND
routeConfiguration:
vhost:
name: "go-server-service:8001"
patch:
operation: MERGE
value:
route:
retry_policy:
rate_limited_retry_back_off:
reset_headers:
- name: retry-after
max_interval: "3s"
But all repeated requests are executed instantly, without any delays.
I found a similar problem here, but this also did not help to add any delay: override-istio-retry-back-off-interval
Do you have any ideas what to check or why the delay is not working?