Get the latest tech news
Exponential Rate Limiting
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.
A moving average allows more flexible policy enforcement because the rate measurement is meaningful even when you don’t apply back-pressure. Deriving the max rate from the other two parameters makes the algorithm easy to configure, and it turns out to simplify the mathematical model very nicely. It turns out that these choices fit together neatly so that fast requests are counted at their full cost, so a client will hit its limit when expected.
Or read this on Hacker News