Build a Rate Limiter

token bucket and sliding windows

Challenge 1 of Traffic & ResilienceIntermediate~60 minFree

Implement the classic rate-limiting algorithms, fixed window, sliding-window log, sliding-window counter, and token bucket, see where each breaks under bursty traffic, then key them per client.

5 steps

  1. 1Fixed-Window Counter
  2. 2Sliding-Window Log
  3. 3Sliding-Window Counter
  4. 4Token Bucket
  5. 5Per-Client Limiting
Start step 1