api: Add BufferRequests field to BackendTrafficPolicy#5537
Merged
arkodg merged 7 commits intoenvoyproxy:mainfrom Mar 28, 2025
Merged
api: Add BufferRequests field to BackendTrafficPolicy#5537arkodg merged 7 commits intoenvoyproxy:mainfrom
arkodg merged 7 commits intoenvoyproxy:mainfrom
Conversation
d20e877 to
c455d3f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5537 +/- ##
==========================================
+ Coverage 65.25% 65.32% +0.06%
==========================================
Files 213 213
Lines 34073 34073
==========================================
+ Hits 22235 22258 +23
+ Misses 10503 10484 -19
+ Partials 1335 1331 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dbf28c8 to
a04b3bb
Compare
Contributor
Author
|
/retest |
a04b3bb to
133d08b
Compare
Contributor
|
CC @guydc I've closed my PR in favor of this one |
zhaohuabing
reviewed
Mar 20, 2025
133d08b to
96c3505
Compare
arkodg
reviewed
Mar 21, 2025
arkodg
reviewed
Mar 21, 2025
063e79d to
610d97a
Compare
arkodg
reviewed
Mar 22, 2025
rudrakhp
approved these changes
Mar 25, 2025
Signed-off-by: mark winter <mark.winter@thetradedesk.com>
Signed-off-by: mark winter <mark.winter@thetradedesk.com>
Signed-off-by: mark winter <mark.winter@thetradedesk.com>
Signed-off-by: mark winter <mark.winter@thetradedesk.com>
Signed-off-by: mark winter <mark.winter@thetradedesk.com>
03abc80 to
96da155
Compare
zirain
approved these changes
Mar 28, 2025
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.
What this PR does / why we need it:
This adds a new field to the
BackendTrafficPolicycalledBufferRequests.This field will be used to configure the
Bufferfilter in Envoy https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/buffer/v3/buffer.proto#envoy-v3-api-msg-extensions-filters-http-buffer-v3-bufferThe buffer filter allows Envoy to buffer and fully receive requests from the client before passing them upstream to the backend, so that the backend only receives the full request and is protected from slow clients/attacks. It also imposes a maximum buffer/request size and a request will be rejected if it's too large.
In the implementation, it's planned that depending on whether the targetRef is a Gateway or a HTTPRoute, it will use the Buffer or BufferPerRoute filter.
I could see this not sitting directly in the
BackendTrafficPolicybut as part of some sub-struct dealing with Requests, or Buffering instead.Potentially introduce a
Typefield to support alpha/not-yet-implemented buffers in the future: filesystem or bufferlessWe could also document that the equivalent in nginx is
proxy_request_bufferingandclient_body_buffer_sizeif thats desired https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_request_bufferingWhich issue(s) this PR fixes:
Ref #3706
Release Notes: No