Closed zeke closed 7 years ago
The best way to handle this is by using the lower level TokenBucket
API. It allows burst rate and fill rate to be configured separately, and you can nest them so an 80/minute bucket can have a parent with a 5000/hour limit.
Thanks for the info @jhurliman. I ended up having pretty good luck just using a smaller time increment.
Hi. I'm hitting the GitHub API using this setting:
This is within GitHub's documented limit, but I'm still getting throttled because
limiter
is making so many concurrent requests. I think this is happening becauselimiter
comes on strong at first and uses some kind of backoff mechanism to taper down the requests over the course of the hour. Is that right?Is there a way to limit the number of concurrent requests?
Here's one way I'm thinking I could approximate it: