envoyproxy / envoyproxy/gateway
Backend traffic policy retry timeout overwriting original request timeout
- Dominant language
- Go
- Stars
- 3k
- Forks
- 864
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 140
Description
*Description*:
>What issue is being seen? Describe what should be happening instead of
the bug, for example: The expected value isn't returned, etc.
When using a GRPCRoute with a BackendTrafficPolicy that has a retry timeout 500ms specified, it overwrites the timeout on the original request. I expected the call to not timeout at 500ms on the original request and only times out at 500ms when the original request actually failed and triggers a retry.
Moreover, the workaround to configure a GRPCRoute in the BTP `timeout:
http:
requestTimeout: 800ms` works on its own, but again also gets overwritten by `retry.timeout` iff the retry timeout value is < http.requestTimeout value.
*Repro steps*:
> Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.
Create a GRPCRoute and expose the server to handle the requests from said route and sleep it for 1s then return an OK response. This should work normally, but now attach a backendTrafficPolicy with retry timeout 500ms, now it fails even though the request is not a retry.
```
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
name: grpc-btp
namespace: default
spec:
healthCheck:
passive:
baseEjectionTime: 3s
consecutive5XxErrors: 20
interval: 2s
maxEjectionPercent: 100
retry:
numRetries: 5
perRetry:
backOff:
baseInterval: 100ms
maxInterval: 1s
timeout: 150ms
```
>**Note**: If there are privacy concerns, sanitize the data prior to
sharing.
*Environment*:
>Include the environment like gateway version, envoy version and so on.
EG 1.3.2
envoy proxy version: envoyproxy/envoy:distroless-v1.32.1
*Logs*:
>Include the access logs and the Envoy logs.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.