Skip to content

feat: request buffer limit - #8893

Draft
zhaohuabing wants to merge 9 commits into
envoyproxy:mainfrom
zhaohuabing:api-request-buffer-limit
Draft

feat: request buffer limit#8893
zhaohuabing wants to merge 9 commits into
envoyproxy:mainfrom
zhaohuabing:api-request-buffer-limit

Conversation

@zhaohuabing

@zhaohuabing zhaohuabing commented Apr 30, 2026

Copy link
Copy Markdown
Member

Implements: #8891
Release note: yes

@zhaohuabing
zhaohuabing requested a review from a team as a code owner April 30, 2026 01:58
@netlify

netlify Bot commented Apr 30, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 82026d4
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a67069ed786f700084d1c81
😎 Deploy Preview https://deploy-preview-8893--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Apr 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.55556% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.70%. Comparing base (b1e2025) to head (82026d4).

Files with missing lines Patch % Lines
internal/gatewayapi/backendtrafficpolicy.go 79.41% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8893      +/-   ##
==========================================
+ Coverage   75.65%   75.70%   +0.04%     
==========================================
  Files         253      253              
  Lines       41879    41896      +17     
==========================================
+ Hits        31684    31716      +32     
+ Misses       8064     8052      -12     
+ Partials     2131     2128       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread api/v1alpha1/backendtrafficpolicy_types.go
@zhaohuabing
zhaohuabing requested a review from a team May 14, 2026 07:07
@github-actions github-actions Bot added the stale label Jun 13, 2026
@zhaohuabing zhaohuabing removed the stale label Jun 14, 2026
@zhaohuabing
zhaohuabing requested a review from yashbhuva June 22, 2026 07:26
@zhaohuabing zhaohuabing changed the title API: request buffer limit feat: request buffer limit Jun 22, 2026
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
@zhaohuabing
zhaohuabing force-pushed the api-request-buffer-limit branch from 8d0f19b to 0ac8c0d Compare June 22, 2026 08:22
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
@zhaohuabing
zhaohuabing requested a review from guydc June 22, 2026 10:51
@zhaohuabing zhaohuabing added this to the v1.9.0-rc.1 Release milestone Jun 22, 2026
@envoyproxy envoyproxy deleted a comment from github-actions Bot Jun 22, 2026
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
@zhaohuabing

Copy link
Copy Markdown
Member Author

retest

@zhaohuabing

Copy link
Copy Markdown
Member Author

/retest

…limit

# Conflicts:
#	release-notes/current.yaml
@zhaohuabing

Copy link
Copy Markdown
Member Author

/retest

kkk777-7
kkk777-7 previously approved these changes Jul 10, 2026
@kkk777-7

Copy link
Copy Markdown
Member

LGTM, thanks!

@zhaohuabing
zhaohuabing requested review from a team and removed request for yashbhuva July 10, 2026 04:38
…limit

# Conflicts:
#	internal/gatewayapi/backendtrafficpolicy.go
@zhaohuabing
zhaohuabing requested a review from kkk777-7 July 21, 2026 10:45
@zirain

zirain commented Jul 21, 2026

Copy link
Copy Markdown
Member

/retest

1 similar comment
@zirain

zirain commented Jul 21, 2026

Copy link
Copy Markdown
Member

/retest

// +kubebuilder:validation:XIntOrString
// +kubebuilder:validation:Pattern="^[1-9]+[0-9]*([EPTGMK]i|[EPTGMk])?$"
// +optional
RequestBodyBufferLimit *resource.Quantity `json:"requestBodyBufferLimit,omitempty"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a must, but could this be part of RequestBuffer?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They have different meanings:

  • RequestBuffer: buffer and fully receive each request from a client before continuing to send the request upstream to the backends.
  • RequestBodyBufferLimit: specifies the maximum size in bytes that Envoy may buffer for request bodies

I'm afraid it would cause confusion if we include both of them inside one RequestBuffer parent type.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @arkodg @guydc for another pair of eyes on the API shape.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a use case where a user would want requestBuffer and not requestBodyBufferLimit ?

@zhaohuabing zhaohuabing Jul 27, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

requestBuffer is self-sufficient. Envoy's buffer filter raises the stream's buffer limit to the configured limit on its own, so requestBuffer.limit: 10Mi works with default connection buffers and nothing else set.

Nesting it under requestBuffer implies it only applies when full buffering is on, which is wrong for the cases this field is meant to serve.

@zhaohuabing zhaohuabing Jul 27, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second thought - even though requestBuffer can work without requestBodyBufferLimit, it sliently raises requestBodyBufferLimit when requestBodyBufferLimit is less than requestBuffer.limit , so we may want:

  1. group them:
requestBuffer:
  limit: 10Mi
  mode: FullBuffer   # default, today's behavior: insert the buffer filter
                     # LimitOnly: only set the route-level body buffer limit
  1. or keep them separate and add a CEL rule forbidding both at once.

I prefer 1. WDYT? @arkodg @zirain

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on opt 1

@arkodg arkodg Jul 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for 1 with alt options for naming :)

kkk777-7
kkk777-7 previously approved these changes Jul 22, 2026
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
@zhaohuabing

Copy link
Copy Markdown
Member Author

/retest

@zhaohuabing
zhaohuabing marked this pull request as draft July 27, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants