Skip to content

feat(ratelimit): support ClusterSetting for ratelimit cluster - #9902

Open
zirain wants to merge 8 commits into
envoyproxy:mainfrom
zirain:ratelimit-clustersettings
Open

zirain wants to merge 8 commits into
envoyproxy:mainfrom
zirain:ratelimit-clustersettings

Conversation

@zirain

@zirain zirain commented Aug 31, 2026

Copy link
Copy Markdown
Member

this's useful if users want to custom the maxRequestsPerConnection for ratelimit_cluster instead of using EnvoyPatchPolicy

we may not need this if we agree to allow #9816 without MergeBackend enabled.

@zirain
zirain requested a review from a team as a code owner August 31, 2026 08:38
@netlify

netlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit ef06393
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6aa7b02830dd9b00080448e3
😎 Deploy Preview https://deploy-preview-9902--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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5d730073d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread api/v1alpha1/envoygateway_types.go
Comment thread api/v1alpha1/envoygateway_types.go
Comment thread api/v1alpha1/envoygateway_types.go
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.31%. Comparing base (01f026a) to head (ef06393).

Files with missing lines Patch % Lines
api/v1alpha1/validation/envoygateway_validate.go 94.28% 4 Missing ⚠️
internal/gatewayapi/globalresources.go 92.85% 1 Missing ⚠️
internal/gatewayapi/runner/runner.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9902      +/-   ##
==========================================
- Coverage   81.31%   81.31%   -0.01%     
==========================================
  Files         264      264              
  Lines       40973    41062      +89     
==========================================
+ Hits        33319    33390      +71     
- Misses       7653     7671      +18     
  Partials        1        1              

☔ 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.

@zirain
zirain force-pushed the ratelimit-clustersettings branch from 1963bcb to 2a0e371 Compare September 1, 2026 05:20
@zirain
zirain marked this pull request as draft September 2, 2026 03:57
@zirain
zirain force-pushed the ratelimit-clustersettings branch from 2a0e371 to 8a58c06 Compare September 2, 2026 04:02
@zirain
zirain marked this pull request as ready for review September 2, 2026 07:43

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d3b4593a7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread api/v1alpha1/envoygateway_types.go Outdated
Comment thread api/v1alpha1/validation/envoygateway_validate.go
Comment thread internal/gatewayapi/globalresources.go Outdated
@zirain
zirain force-pushed the ratelimit-clustersettings branch from 803565c to bbd229d Compare September 2, 2026 10:41
@zirain zirain added this to the v1.10.0-rc.1 Release milestone Sep 3, 2026
Comment thread internal/ir/xds.go Outdated
Comment thread api/v1alpha1/envoygateway_types.go Outdated
// service, such as circuit breakers, timeouts, health checks, and load balancing.
//
// +optional
BackendSettings *ClusterSettings `json:"backendSettings,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.

Nit, the combination of BackendSettings and Backend is a bit confusing inside RateLimit.

@zirain zirain Sep 4, 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.

that's because backend in Ratelimit means the redis backend.
Rename to ClusterSettings, WDYT?

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.

ClusterSettings works for me.

@zirain
zirain force-pushed the ratelimit-clustersettings branch from acf44fb to 08ba30b Compare September 9, 2026 09:24
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
@zirain
zirain force-pushed the ratelimit-clustersettings branch from 08ba30b to 268861c Compare September 10, 2026 01:21
@zirain
zirain requested a review from zhaohuabing September 10, 2026 02:29
@zirain
zirain force-pushed the ratelimit-clustersettings branch from ae190ba to e71d046 Compare September 10, 2026 02:53
@zirain

zirain commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

/retest

@zirain
zirain force-pushed the ratelimit-clustersettings branch from e71d046 to 33918e7 Compare September 11, 2026 00:58
Signed-off-by: zirain <zirain2009@gmail.com>
@zhaohuabing
zhaohuabing requested review from a team and removed request for zhaohuabing September 11, 2026 05:40
// +optional
Telemetry *RateLimitTelemetry `json:"telemetry,omitempty"`

// ClusterSettings holds configuration for managing the connection to the rate limit

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.

shouldnt this be BackendSettings similar to Policy counterpart ?

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.

because of #9902 (comment)

@zhaohuabing

Copy link
Copy Markdown
Member

@codex review

@zirain

zirain commented Sep 20, 2026

Copy link
Copy Markdown
Member Author

@codex review

This branch has not been deployed

No deployments
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.

3 participants