-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
'Stricter' rate limiter #322
Comments
Hi @guersam, do you still experience this issue with the latest ZIO version? |
@svroonland Yes, because it's intended behavior of I ended up with writing my own sliding window pipeline and it just works. If you think sliding window is more suitable than token bucket for rate limiters, I'm willing to contribute my implementation as well. |
@guersam I'd be interested in that implementation, definitely. Apologies for the late reply. Looking forward to a PR! |
I have a rate limit requirement for a third party API.
At first it sounded very easy with rezilience. But when I tested against the real server, several requests were blocked due to the rate limit. I've tried manually setting burst to 0, but had no luck.
Here's a minimal reproduction:
Expected Result
Given rate limit of 10 per second, the second 10 timestamps should be at least 1 second from start because the limit of 10 is already reached within the first second
Actual Result
The 11th elements is emitted even before 0.3 seconds
Related issue
zio/zio#7888
The text was updated successfully, but these errors were encountered: