Curriculum · Module 04, Rate Limiting and Backpressure
Rate limiting algorithms
Five ways to count requests, and what each one allows through when traffic comes in bursts.
What each topic covers
- One caller can use up a shared service. A limiter decides, request by request, who gets in.
- Fixed window, sliding log, sliding counter, token bucket and leaky bucket, and the state each one keeps.
- Send one edge-straddling burst through all five limiters and compare what each lets through and what it stores.
- Measured worst-case bursts, what a strict limit rejects, and the memory each limiter keeps per caller.
- Weigh the previous window by its overlap, run the arithmetic on real counts, and see exactly when the estimate is wrong.
- Charge expensive calls more tokens, choose the key with care, and layer per-key, per-address and global limits without double-charging.
- Three checks on hard caps, clumpy traffic and per-user state, plus the standards and papers behind limiters.
Topics
Practise this lesson
13 interview questions on rate limiting algorithms, with worked answers and sources.
Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms