Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add per-verb local rate limiter #36254

Closed
leosarra opened this issue Sep 20, 2024 · 3 comments
Closed

Add per-verb local rate limiter #36254

leosarra opened this issue Sep 20, 2024 · 3 comments
Labels
area/ratelimit enhancement Feature requests. Not bugs or questions.

Comments

@leosarra
Copy link
Contributor

leosarra commented Sep 20, 2024

Title: Add per-verb local rate limiter

Description:
Currently, Envoy's local rate limit filter applies limits uniformly across all HTTP methods for a given route or virtual host.
However, while playing around with this feature internally we realized that different HTTP verbs may require different rate limiting policies. For example:

GET requests might be allowed at a higher rate than POST requests
PUT and DELETE requests might need stricter rate limiting than GET requests
Some verbs might not require rate limiting at all

It would be great if the existing local rate limiter is enhanced to set some per-verb limits, with this enhancement we could provide users with more fine-grained control over their traffic management.
Do you feel this is something that makes sense and that is feasible?

@leosarra leosarra added enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Sep 20, 2024
@zuercher zuercher added area/ratelimit and removed triage Issue requires triage labels Sep 20, 2024
@zuercher
Copy link
Member

cc @wbpcode

@wbpcode
Copy link
Member

wbpcode commented Sep 21, 2024

I think you could be achieved by the header_value_match (method will be tread as header :method) in the RateLimit. Note the local rate limit also supports the rate limit descriptor, get more detail from https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto#envoy-v3-api-msg-extensions-filters-http-local-ratelimit-v3-localratelimit

@leosarra
Copy link
Contributor Author

Thank you a lot @wbpcode
I did not know about the descriptors. I think I can handle the usecase with that.
I close this feature request as it is not needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ratelimit enhancement Feature requests. Not bugs or questions.
Projects
None yet
Development

No branches or pull requests

3 participants