Rate Limiter

Interactive visualizations of rate-limiting algorithms.

  1. Fixed Window

    Requests are counted inside fixed intervals; the counter resets at each boundary. Demonstrates the burst-at-the-boundary weakness.

    5 req / 10 s boundary bursts
  2. Sliding Window

    The window slides continuously with the current moment, so old requests expire gradually and no hard reset boundary exists to exploit.

    5 req / 10 s trailing smooth
  3. Token Bucket

    Tokens refill at a steady rate and accumulate while idle, allowing short bursts up to capacity while still enforcing the long-run average rate.

    capacity 5, refill 1/s bursty
  4. Leaky Bucket

    Requests queue in a fixed-capacity bucket that drains at a constant rate; a full bucket overflows. Turns bursty input into constant outflow.

    capacity 10, leak 1/s shaping