HLD prep is optimised for larger screens
Open on a laptop or desktop (1024px+) for the diagram canvas and the section sidebar side-by-side.
Problem Understanding
Restate the problem in your own words.
Design a Rate Limiter
Design a distributed rate limiter that sits in front of every public API: enforces per-IP, per-user, and per-API-key quotas; supports tier-based policies (free vs. paid); and fails open on its own outage instead of blocking the product behind it. The decisive trade-offs are token-bucket vs. sliding-window precision, where the counters live (Redis cluster vs. local-and-flush), and how to keep the limiter from becoming the next single point of failure on the request path.
- Stripe API100 req/sec per account on read endpoints; documented 429s with `Retry-After`. Burst-friendly token bucket.
- GitHub API5000 req/hr per token. Headers expose remaining + reset window.
- AWS API GatewayThrottling and burst per-stage / per-method. Token-bucket model under the hood.
- Cloudflare WAFEdge rate-limiting rules at very high volume — leverages distributed counters across PoPs.
Your task: read the problem above, then write what the system is, who uses it, the rough scale, and the headline UX expectation — in your own words. Submit for AI review when you're ready.
Click any step in the sidebar to jump around — sections don't have to be done in order. Press ? any time to see all shortcuts.