envoyproxy / envoyproxy/gateway
BackendTrafficPolicy requestTimeout does not take effect when faultInjection delay exceeds timeout
- Dominant language
- Go
- Stars
- 3k
- Forks
- 864
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 140
Description
*Description*:
>I configured a BackendTrafficPolicy with requestTimeout: 60s and faultInjection.delay.fixedDelay: 65s on the same HTTPRoute. I expected the request to be terminated at 60s due to the timeout, but the request completed after 65s (the full fault injection delay), indicating the requestTimeout was ignored.
*Repro steps*:
> Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.
1Apply the following BackendTrafficPolicy:
`apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
name: backend-policy
namespace: test
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: httpheader-zeasn-tv
compression:
- type: Gzip
timeout:
http:
connectionIdleTimeout: 60s
requestTimeout: 60s
retry:
numRetries: 3
retryOn:
httpStatusCodes:
- 502
- 503
faultInjection:
delay:
fixedDelay: 65s
`
2. send request
`time curl https://httpheader.zeasn.tv`
3 Observe the result:
real 1m5.663s
The request took ~65s (matching the fault injection delay), not 60s (the configured timeout).
Expected behavior
The request should be terminated at 60s with a 504 Gateway Timeout, because requestTimeout: 60s is shorter than faultInjection.delay.fixedDelay: 65s.
Actual behavior
The request completed after 65s with a 200 response, meaning the requestTimeout did not take effect.
Policy status
The policy shows Accepted: True with no errors:
status:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: Gateway
name: dev-envoy
namespace: envoy-gateway-system
conditions:
- lastTransitionTime: "2026-02-06T06:00:58Z"
message: Policy has been accepted.
observedGeneration: 6
reason: Accepted
status: "True"
type: Accepted
controllerName: gateway.envoyproxy.io/gatewayclass-controller
Environment
Envoy Gateway version:v1.6.3 (Helm chart v1.6.3)
Question
Is this expected behavior? Does fault injection bypass the requestTimeout setting? If so, is there a way to enforce the timeout even when fault injection is active?
*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.