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'll be honest - my attempt at this was quite unsuccessful as I am not sure I understand the algorithm 100% .. so I'm creating an issue to get your thoughts.
I would like to change the rate dynamically. I added a SetRate method to the bucket that basically creates and sets a new fillInterval and quantum.. but clearly this is incorrect as the speed of the bucket becomes exponentially slower until it eventually hits zero and stops completely.
Any advice?
Cheers,
Simon
The text was updated successfully, but these errors were encountered:
[Sorry for outrageously tardy response to this issue - I've just fixed my github notifications so I don't lose everything!]
Changing the rate dynamically is hard the way that the algorithm works. I'm not sure it actually can work, because if something is already waiting for free tokens and the rate changes, there's nothing that can make it change the amount of time it's already indented to sleep for.
I'd suggest that creating a new token bucket with the different rate might be another possible solution.
Hello,
I'll be honest - my attempt at this was quite unsuccessful as I am not sure I understand the algorithm 100% .. so I'm creating an issue to get your thoughts.
I would like to change the
rate
dynamically. I added aSetRate
method to the bucket that basically creates and sets a newfillInterval
andquantum
.. but clearly this is incorrect as the speed of the bucket becomes exponentially slower until it eventually hits zero and stops completely.Any advice?
Cheers,
Simon
The text was updated successfully, but these errors were encountered: