Skip to content

feat: support rate limit based on path and method#7046

Merged
arkodg merged 23 commits intoenvoyproxy:mainfrom
kkk777-7:feat-rl-path-and-method
Oct 30, 2025
Merged

feat: support rate limit based on path and method#7046
arkodg merged 23 commits intoenvoyproxy:mainfrom
kkk777-7:feat-rl-path-and-method

Conversation

@kkk777-7
Copy link
Copy Markdown
Member

What this PR does / why we need it:
support rate limit based on path and method.

Which issue(s) this PR fixes:

Fixes #4449

Release Notes: Yes

@kkk777-7 kkk777-7 requested a review from a team as a code owner September 24, 2025 16:52
Signed-off-by: kkk777-7 <[email protected]>
@kkk777-7 kkk777-7 force-pushed the feat-rl-path-and-method branch from e3d8030 to fd3d99c Compare September 24, 2025 16:55
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 24, 2025

Codecov Report

❌ Patch coverage is 79.93921% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.06%. Comparing base (398cd8a) to head (d66a4b4).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
internal/xds/translator/local_ratelimit.go 64.49% 47 Missing and 2 partials ⚠️
internal/gatewayapi/backendtrafficpolicy.go 48.14% 13 Missing and 1 partial ⚠️
internal/xds/translator/ratelimit.go 98.15% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7046      +/-   ##
==========================================
+ Coverage   72.03%   72.06%   +0.03%     
==========================================
  Files         231      231              
  Lines       33468    33634     +166     
==========================================
+ Hits        24108    24239     +131     
- Misses       7604     7646      +42     
+ Partials     1756     1749       -7     

☔ View full report in Codecov by Sentry.
📢 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.

@arkodg arkodg added this to the v1.6.0-rc.1 Release milestone Oct 7, 2025
@kkk777-7 kkk777-7 force-pushed the feat-rl-path-and-method branch 2 times, most recently from 7a48c92 to c179c5e Compare October 14, 2025 01:08
@kkk777-7
Copy link
Copy Markdown
Member Author

/retest

Signed-off-by: kkk777-7 <[email protected]>
@kkk777-7 kkk777-7 force-pushed the feat-rl-path-and-method branch from c179c5e to 28f0adc Compare October 14, 2025 14:36
Signed-off-by: kkk777-7 <[email protected]>
@kkk777-7 kkk777-7 force-pushed the feat-rl-path-and-method branch from 22a2a47 to 929053f Compare October 14, 2025 16:42
@arkodg arkodg requested review from zhaohuabing and zirain October 14, 2025 18:46
zirain
zirain previously approved these changes Oct 29, 2025
@jukie
Copy link
Copy Markdown
Contributor

jukie commented Oct 29, 2025

@kkk777-7 can you rebase and fix the release notes conflict?

@kkk777-7
Copy link
Copy Markdown
Member Author

@zirain
Copy link
Copy Markdown
Member

zirain commented Oct 30, 2025

It seems that the failure is occurring when referencing Gateway API docs. https://github.com/envoyproxy/gateway/actions/runs/18925102717/job/54030294552?pr=7046

it's a known issue, I'm working on that. #7370 will ignore it.

@arkodg
Copy link
Copy Markdown
Contributor

arkodg commented Oct 30, 2025

@kkk777-7 there seems to be one issue - path prefix of /foo will also rate-limit /foobar, can we address this in a follow up, and handle it in a way similar to how we handle route match (PathSeparatedPrefix)

@arkodg arkodg merged commit 5ce8a93 into envoyproxy:main Oct 30, 2025
32 of 35 checks passed
@kkk777-7
Copy link
Copy Markdown
Member Author

@kkk777-7 there seems to be one issue - path prefix of /foo will also rate-limit /foobar, can we address this in a follow up, and handle it in a way similar to how we handle route match (PathSeparatedPrefix)

thanks @arkodg , I’ll create an issue and look into it later.

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.

Ratelimit based on path and method

5 participants