Uh oh!
There was an error while loading. Please reload this page.
[RateLimiting] Handle Timer jitter - #74360
Conversation
ghost
commented
Aug 22, 2022
Tagging subscribers to this area: @mangod9 Issue DetailsFixes #74056 Two approaches are used here, we "trust the timer" when auto replenish is enabled so FixedWindow and SlidingWindow will always move the window when the timer fires. And in the token bucket case we change to use a fill rate internally and update with partial tokens when replenish is called, no matter how frequently. Also added validation for not passing TimeSpan.Zero to the limiters, but we could revert that if we just want TimeSpan.Zero to mean never replenish (Timer already uses TimeSpan.Zero as never run the timer).
|
BrennanConroy
commented
Sep 1, 2022
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2975631117 |
BrennanConroy
commented
Sep 2, 2022
Failures are tracked by #74952 unrelated to this change. Merging. |
Fixes#74056
Two approaches are used here, we "trust the timer" when auto replenish is enabled so FixedWindow and SlidingWindow will always move the window when the timer fires. And in the token bucket case we change to use a fill rate internally and update with partial tokens when replenish is called, no matter how frequently.
Also added validation for not passing TimeSpan.Zero to the limiters, but we could revert that if we just want TimeSpan.Zero to mean never replenish (Timer already uses TimeSpan.Zero as never run the timer).