Open
Description
Hello, I was wondering what the best way would be to change a rate limiter's quota. Following this thread from a few years ago, it seemed like there was some interest in allowing for rate limiters to change their parameters, but that there were some difficulties due to potential overhead for making this thread-safe.
I believe then, that the best way to adjust a rate limiter's quota is effectively to make a new one. If I consume a rate limiter with RateLimiter::into_state_store()
and construct a new one with RateLimiter::new()
with a new quota and the previous state, would the new rate limiter accurately keep track of the previous requests within the relevant window? Would this still work depending on if the quota increased or decreased?
Metadata
Metadata
Assignees
Labels
No labels