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
{{ message }}
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
Is your enhancement request related to a problem? Please describe.
Currently, precise publish rate limiting doesn't work as expected and that's because multiple reasons
Renew function called every second and resets reading from socket every second no matter how many messages produced in the last second (FixedWindow Algorithm)
The FixedWindow algorithm does not fit here because a permit is not 1:1 (multiple messages in batch, bytes per second)
Rate limit function passed only to the msg/s rate limiter (and that's in order to avoid calling it twice)
The first message of any new producer that connects to the broker will get in
Describe the solution you'd like
1 + 2. in order to fix that, I believe we should implement another RateLimiter using the LeakingBucket Algorithm along with FixedWindow
3. we should pass a rate limit function that depends on the state of both of the rate limiters
4. I don't really have an idea how to implement a fix for it would love to hear ur opinions
Original Issue: apache#11351
Is your enhancement request related to a problem? Please describe.
Currently, precise publish rate limiting doesn't work as expected and that's because multiple reasons
Describe the solution you'd like
1 + 2. in order to fix that, I believe we should implement another RateLimiter using the LeakingBucket Algorithm along with FixedWindow
3. we should pass a rate limit function that depends on the state of both of the rate limiters
4. I don't really have an idea how to implement a fix for it would love to hear ur opinions
Additional context
The main idea is thanks to apache#8611 (comment) @lhotari
The text was updated successfully, but these errors were encountered: