System Design ($200k+) · RELIABILITY · Distributed Systems Core · 2026

Sliding Window / Token Bucket vs Fixed-Window Counter Rate Limiter

Quick Decision Rule: When Enforcing a strict 100 req/min API quota so a bursty client cannot push 200 requests through in 2 seconds across a minute boundary, choose Token Bucket or Sliding Window Log/Counter.

Trigger ConditionEnforcing a strict 100 req/min API quota so a bursty client cannot push 200 requests through in 2 seconds across a minute boundary
Recommended ChoiceToken Bucket or Sliding Window Log/Counter
Classic TrapFixed-window counters allow 2x traffic bursts at window boundaries (100 requests at 00:59 + 100 requests at 01:00).
VerificationAudited on 2026-11-23 · Distributed Systems Core · 2026

30-SECOND DECISION TRAP CHECK · RELIABILITY

Test your instinct

Your API gateway enforces 100 req/min using a fixed-window Redis counter (`INCR user:HH:MM`). An automated scraper fires 100 requests at 12:00:59 and 100 more at 12:01:00—pushing 200 requests in 2 seconds and overloading downstream workers. Which algorithm prevents this boundary burst?

Primary Engineering Documentation

Related Reliability Decision Guides