Possible to create a dynamic rate limiter?
See original GitHub issueSome APIs have strict limits. However, we need to put a rate limit on API calls to servers of unknown CPU/RAM. We can probably write a plugin to get stats reported back to us, and scale the rate limit up/down, but then we need to modify the existing RateLimiter
. RateLimiterConfig
doesn’t have any mutator methods.
Could setters be added for timeoutDuration
, limitRefreshPeriod
and limitForPeriod
?
Alternatively, maybe something like a RateLimiterScalingStrategy
and the default would be NoScalingStrategy
that duplicates the current behavior. Then we could write a custom implementation?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Designing Simple & Dynamic Rate Limiter In Golang - Medium
Rate limiter is a good think if you want to limit the number of request for your backend service in a certain time...
Read more >Dynamic Rate Limiter - VMware Docs
The dynamic rate limiter is used if you want to rate limit the number of connections/ request on virtual service for any user....
Read more >Designing a Rate Limiter - Towards Data Science
The task of a rate limiter is to limit the number of requests to or from a system.
Read more >Dynamic Rate Limiting - YouTube
A default rate limit policy is a great way to protect your API, but sometimes you need more control.
Read more >learn hapi — Dynamic Rate Limits (Part 3 of 7) - Future Studio
Your rate limiter grows in functionality. You already built an IP-based rate limiting that is configurable for each route.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
merged to master
Looks good to me. Thanks!