rate_limit_quota: make usage reporting interval configurable - #47104
rate_limit_quota: make usage reporting interval configurable#47104thev1ndu wants to merge 1 commit into
Conversation
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>
|
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. |
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
| // 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. |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
change itself LGTM, maybe we should clarify the doc a bit as Adi suggested below
| // 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. |
There was a problem hiding this comment.
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.
Hi sure I'll look into it |
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 optionalreporting_intervalfield toRateLimitQuotaFilterConfigand 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.