Skip to content

rate_limit_quota: make usage reporting interval configurable - #47104

Open
thev1ndu wants to merge 1 commit into
envoyproxy:mainfrom
thev1ndu:rlqs-configurable-reporting-interval
Open

rate_limit_quota: make usage reporting interval configurable#47104
thev1ndu wants to merge 1 commit into
envoyproxy:mainfrom
thev1ndu:rlqs-configurable-reporting-interval

Conversation

@thev1ndu

@thev1ndu thev1ndu commented Sep 1, 2026

Copy link
Copy Markdown

Commit Message:
rate_limit_quota: make usage reporting interval configurable

Additional Description:
The RLQS filter reports quota usage to the server on a fixed 5s interval that is hardcoded in filter_persistence.cc. This adds an optional reporting_interval field to RateLimitQuotaFilterConfig and plumbs it through to the global client. When the field is unset the behavior is unchanged (5s default).

The data plane keeps one RLQS client per (server target, domain) pair, so the interval takes effect when that client is first created. This matches the sharing model already documented for other per-client settings on the same index.

Per-bucket reporting intervals (the existing TODO(bsurber)) are out of scope here.

Risk Level: Low — additive optional field, default preserves current behavior.
Testing: Added a config unit test for the configured-interval path; existing tests cover the default.
Docs Changes: API field doc comment plus a changelog entry.
Release Notes: changelogs/current/new_features/ratelimit__rlqs-configurable-reporting-interval.rst
Platform Specific Features: None
Fixes #46033
API Considerations: Additive optional field on an existing message; no changes to defaults or existing fields.

I used an AI assistant to help write and review this change. I understand the code and take responsibility for it.

The RLQS filter reported quota usage to the server on a hardcoded 5s
interval. Add an optional reporting_interval field to
RateLimitQuotaFilterConfig so it can be tuned, keeping 5s as the default
when the field is unset.

Fixes envoyproxy#46033

Signed-off-by: thev1ndu <itsthw9@gmail.com>
@repokitteh-read-only

Copy link
Copy Markdown

Hi @thev1ndu, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

🐱

Caused by: #47104 was opened by thev1ndu.

see: more, trace.

@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @adisuissa
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #47104 was opened by thev1ndu.

see: more, trace.

Comment on lines +141 to +145
// The data plane keeps a single RLQS client (and therefore a single reporting timer) per unique
// combination of RLQS server target and :ref:`domain
// <envoy_v3_api_field_extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaFilterConfig.domain>`.
// When several filter configurations share the same target and domain, the value from the first
// initialized configuration is used.

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.

I wonder if the use of a singleton RLQS client is an Envoy specific implementation, or more general (and if so, should be clarified in the description of the filter, and not only in this field).
Assigning @tyxia as codeowner.
/assign @tyxia

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.

i thought "singleton RLQS client" should already be clarified in the filter. I agree it will be confusing if this is only mentioned in this field.

@tyxia tyxia left a comment

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.

change itself LGTM, maybe we should clarify the doc a bit as Adi suggested below

Comment on lines +141 to +145
// The data plane keeps a single RLQS client (and therefore a single reporting timer) per unique
// combination of RLQS server target and :ref:`domain
// <envoy_v3_api_field_extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaFilterConfig.domain>`.
// When several filter configurations share the same target and domain, the value from the first
// initialized configuration is used.

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.

i thought "singleton RLQS client" should already be clarified in the filter. I agree it will be confusing if this is only mentioned in this field.

@thev1ndu

thev1ndu commented Sep 2, 2026

Copy link
Copy Markdown
Author

change itself LGTM, maybe we should clarify the doc a bit as Adi suggested below

Hi sure I'll look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reporting Interval not configurable from EnvoyFilters.

3 participants