question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible to create a dynamic rate limiter?

See original GitHub issue

Some 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:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
storozhukBMcommented, Nov 27, 2017

merged to master

1reaction
efenderboschcommented, Nov 27, 2017

Looks good to me. Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found