-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Support multiples of units for rate limits #33277
Comments
I added my implementation built on the proposed |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
Hey @mattklein123 @esmet, this is still relevant. I had a brief look into the c++ ratelimit headers. I guess we would need to extend those as well?
|
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
Not stale, waiting for input. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions. |
Waiting for this feature |
Waiting for it too |
in need of this ! |
Not stale. Ping @esmet @mattklein123, can you please have a look? @soulxu can you please mark this as not stale again? Thanks! |
@harpunius Can you please make the necessary API change and propose a PR? |
Title: Support multiples of units for rate limits
Description:
We want to be able to specify rate limit intervals more flexibly than per-minute or per-second, for example per 30 seconds or per 10 minutes. Concretely, we have some bursts over 2-3 minutes that we want to restrict. We can only do this by rate limiting per-minute or per-hour, the former not reflecting continuous load and the latter not re-allowing traffic until a full hour has passed.
This is also described in envoyproxy/ratelimit#190 and I planned to contribute this feature for envoyproxy/ratelimit but got stuck at the centralised protobuf definition, hence this issue.
My proposed solution would simply be to extend RateLimit with a new field:
Relevant Links:
The relevant call (for redis) is https://github.com/envoyproxy/ratelimit/blob/main/src/redis/fixed_cache_impl.go#L155. The ratelimit service iterates over a list of internal
limits []*config.RateLimit
objects, that each contain aLimit
struct (https://github.com/envoyproxy/ratelimit/blob/3654bfd73dc728debfc280b2097664f595036197/src/config/config.go#L22), pointing to the generated pb.go file (https://github.com/envoyproxy/go-control-plane/blob/main/envoy/service/ratelimit/v3/rls.pb.go#L357-L367).The text was updated successfully, but these errors were encountered: