exponential rate limiting – Tony Finch
Following my previous post on rate limiting with GCRA, leaky buckets without the buckets, I reviewed my old notes on rate limiting for Exim. I thought I should do a new write-up of the ideas that I hope will be more broadly interesting. Exponential rate limiting uses an exponentially-weighted moving average to measure the client’s rate. It is motivated by a shift of perspective: Algorithms like GCRA and leaky bucket don’t allow you to separate these two points because they don’t measure the client’s rate as a concrete number. A moving average allows more flexible policy enforcement because the rate measurement is meaningful even when you don’t apply back-pressure. For example, it’s useful in a dry run mode, or when diverting messages to a quarantine. An exponential rate limiter stores, for each client: This is a similar amount of space as leaky bucket. GCRA uses less space because it only needs to store a time. The main disadvantage is that an exponential rate limiter needs fairly comp
Following my previous post on rate limiting with GCRA, leaky buckets without the buckets , I reviewed my old notes on rate limiting for Exim . I thought I should do a new write-up of the ideas that I hope will be more broadly interesting. Edit: I have written some more recent notes on ratelimiting . Exponential rate limiting uses an exponentially-weighted moving average to measure the client’s rate. It is motivated by a shift of perspective: first measure the client’s rate, then compare it to the limit. Algorithms like GCRA and leaky bucket don’t allow you to separate these two points because
saved by
related reading
- Why Momentum Really Worksdistill.pub
- Retry failed requestscloud.google.com
- Exponential distribution - Wikipediaen.wikipedia.org
- Exponential Distribution: Uses, Parameters & Examples - Statistics By Jimstatisticsbyjim.com
- An Intuitive Guide To Exponential Functions & e – BetterExplainedbetterexplained.com
- Elevatorsjohn.fun
- Speeding up RL with high-leverage samples | Applied Computeappliedcompute.com
- tokens are getting more expensive - by Ethan Dingethanding.substack.com
- How to Rate-Limit an API Query: Throttling Made Easyprogress.com
- Power law - Wikipediaen.wikipedia.org
- The Multi-Armed Bandit Problem and Its Solutions | Lil'Loglilianweng.github.io
- Compute credits and spending limitaxiom.co