You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
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.
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: