http/ratelimit,http/ext_authz: change timeout=0 behavior#43020
Merged
mattklein123 merged 3 commits intoenvoyproxy:mainfrom Jan 25, 2026
Merged
http/ratelimit,http/ext_authz: change timeout=0 behavior#43020mattklein123 merged 3 commits intoenvoyproxy:mainfrom
mattklein123 merged 3 commits intoenvoyproxy:mainfrom
Conversation
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
When configuring timeout: 0s in the HTTP rate limit or ext_authz filters, requests would fail immediately instead of having no timeout (infinite). This happened because timeout: 0s was converted to std::chrono::milliseconds(0) and passed to the gRPC client. In the gRPC client layer: - Google gRPC: deadline = now + 0ms = now (immediate timeout) - Envoy gRPC: sets grpc-timeout: 0m header (interpreted as immediate timeout) This behavior is inconsistent with other Envoy timeout configurations (e.g., RouteAction.timeout) where 0 explicitly means "disabled/infinite". Also the doc is actually unclear about it (before the patch). Convert timeout: 0s to absl::nullopt (no timeout) instead of std::chrono::milliseconds(0). This makes the behavior consistent: - timeout not set: use default (20ms for ratelimit, 200ms for ext_authz) - timeout: 0s: infinite (no timeout) - timeout: >0: actual timeout value we could possibly change that behavior with a flag to revert. Signed-off-by: William Dauchy <william.dauchy@datadoghq.com>
adisuissa
reviewed
Jan 20, 2026
Contributor
adisuissa
left a comment
There was a problem hiding this comment.
/lgtm api
Assigning code-owners.
/assign @esmet @mattklein123
|
|
||
| // The timeout in milliseconds for the rate limit service RPC. If not | ||
| // set, this defaults to 20ms. | ||
| // set, this defaults to 20ms. A value of 0 disables the timeout (infinite). |
Contributor
There was a problem hiding this comment.
I guess that in this case the request/connection timeouts will be used (so it may not be infinite).
Not sure if it's worth pointing out or not, and I'll leave it to the rate-limit owners to decide.
Contributor
|
/assign @esmet @mattklein123 |
mattklein123
requested changes
Jan 24, 2026
Member
mattklein123
left a comment
There was a problem hiding this comment.
Needs a release note, thanks.
/wait
# Conflicts: # test/extensions/filters/http/ext_authz/ext_authz_test.cc
Signed-off-by: William Dauchy <william.dauchy@datadoghq.com>
Contributor
Author
now fixed |
mattklein123
approved these changes
Jan 25, 2026
shane-yuan
pushed a commit
to shane-yuan/envoy
that referenced
this pull request
Feb 11, 2026
…43020) Commit Message: When configuring timeout: 0s in the HTTP rate limit or ext_authz filters, requests would fail immediately instead of having no timeout (infinite). This happened because timeout: 0s was converted to std::chrono::milliseconds(0) and passed to the gRPC client. In the gRPC client layer: - Google gRPC: deadline = now + 0ms = now (immediate timeout) - Envoy gRPC: sets grpc-timeout: 0m header (interpreted as immediate timeout) This behavior is inconsistent with other Envoy timeout configurations (e.g., RouteAction.timeout) where 0 explicitly means "disabled/infinite". Also the doc is actually unclear about it (before the patch). Convert timeout: 0s to absl::nullopt (no timeout) instead of std::chrono::milliseconds(0). This makes the behavior consistent: - timeout not set: use default (20ms for ratelimit, 200ms for ext_authz) - timeout: 0s: infinite (no timeout) - timeout: >0: actual timeout value we could possibly change that behavior with a flag to revert. Additional Description: Risk Level: Testing: Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] --------- Signed-off-by: William Dauchy <william.dauchy@datadoghq.com>
grnmeira
pushed a commit
to grnmeira/envoy
that referenced
this pull request
Mar 20, 2026
…43020) Commit Message: When configuring timeout: 0s in the HTTP rate limit or ext_authz filters, requests would fail immediately instead of having no timeout (infinite). This happened because timeout: 0s was converted to std::chrono::milliseconds(0) and passed to the gRPC client. In the gRPC client layer: - Google gRPC: deadline = now + 0ms = now (immediate timeout) - Envoy gRPC: sets grpc-timeout: 0m header (interpreted as immediate timeout) This behavior is inconsistent with other Envoy timeout configurations (e.g., RouteAction.timeout) where 0 explicitly means "disabled/infinite". Also the doc is actually unclear about it (before the patch). Convert timeout: 0s to absl::nullopt (no timeout) instead of std::chrono::milliseconds(0). This makes the behavior consistent: - timeout not set: use default (20ms for ratelimit, 200ms for ext_authz) - timeout: 0s: infinite (no timeout) - timeout: >0: actual timeout value we could possibly change that behavior with a flag to revert. Additional Description: Risk Level: Testing: Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] --------- Signed-off-by: William Dauchy <william.dauchy@datadoghq.com> Signed-off-by: Gustavo <grnmeira@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message:
When configuring timeout: 0s in the HTTP rate limit or ext_authz filters, requests would fail immediately instead of having no timeout (infinite).
This happened because timeout: 0s was converted to std::chrono::milliseconds(0) and passed to the gRPC client. In the gRPC client layer:
This behavior is inconsistent with other Envoy timeout configurations (e.g., RouteAction.timeout) where 0 explicitly means "disabled/infinite".
Also the doc is actually unclear about it (before the patch).
Convert timeout: 0s to absl::nullopt (no timeout) instead of std::chrono::milliseconds(0). This makes the behavior consistent:
we could possibly change that behavior with a flag to revert.
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]