ratelimit icon indicating copy to clipboard operation
ratelimit copied to clipboard

A Go blocking leaky-bucket rate limit implementation

Results 16 ratelimit issues
Sort by recently updated
recently updated
newest added

The problem in the previous approach was that mock time literally didn't run between `limite.Take()` calls, so `now.Sub(oldState.last)` would always be 0 that can be problematic for some issues detection....

First off thanks for the library :) Saw that a new rate limiter was introduced that benchmarked a lot better and pulled it down to try it out. Noticed that...

This package initially seemed ideal for my use case - It supports refilling at a certain rate (so limits such as 10 per 2 minutes are possible) however only exposing...

This allows to implement nice things! An example: Implement an adaptative rate limiting from outside de library, enabling algorithms like: 1. start with a small ratelimiting value 2. periodically increase...

when I use `ticker := ratelimit.New(0)` the code will throw exception, but when I use negative I works ok but loss my mind. `ticker := ratelimit.New(-1)` Pre-Request wait 10s. if...

Currently we are unable to observe the difference between ratelimit with and without slack. Investigate a test that makes the difference observable and verifiable.

#15 brought in a new implementation of Take to avoid starving out the older mutex implementation (a major performance win). Before we cut a new release, let's dive a little...

Not updating Go version in go.mod since we don't need any new functionalities.

There were quite a few fixes in that repo, let's pull them in. We've had a few mock-clock bugs before (#90), I'm hoping that with the new versions #93 won't...