flâneur — a map of the web's best reading

exponential rate limiting – Tony Finch

dotat.at · 1,590 words · saved by 1 readers

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

Explore this link on the map →

saved by

related reading