Code RoomGlobal distributed rate limiter
HardPrep Room Coding #3739

Global distributed rate limiter

System designDatabases & SQLNetworking & APIsSenior–Staff~45 min

Design a distributed rate limiter for a public API gateway running on 200 edge nodes that must enforce per-API-key limits (e.g. 1000 req/min) globally, not per-node. Constraints: 500k req/sec aggregate, the limit decision must add under 1ms to the request path, and overshoot of the global limit should be small and bounded. Explain where counters live, how concurrent nodes coordinate a shared budget, and what happens when the coordination store is briefly unreachable.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify5:00 left
Estimate5:00 planned
Design15:00 planned
Deep dive12:00 planned
Failure8:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.