-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Way too many events allowed when burst is not 1 #24
Comments
Perhaps I'm just not understanding how this new algorithm operates. I guess the burst is the initial token count and you can have any number of them, such that the use rate won't match the actual rate limit set. Unfortunately not the way I was hoping this package would work... |
I guess I'll close this; I was hoping it'd behave like a rolling window rate limiter, but that isn't the case. Just wrote my own with sorted sets of timestamps instead. 😛 |
Do you have a link to share? :)
Yeah, you may think of it as the bucket size with is re-filled at the given rate. |
If you mean a link to my code, not yet, no. |
Run:
And I get:
The rate was set to 17 per 30 seconds, but each run allows much more than 17. Change burst to 1:
Which makes a little more sense. If you make the burst go even higher, then you can end up allowing every event, but I'm assuming a burst above the rate is not a correct configuration.
The text was updated successfully, but these errors were encountered: