Code Room
System designHardsd-g631
Subject Distributed rate limiterLevel Senior–Staff~45 minCommon in Databases & SQL · Networking & APIs · Distributed systems interviewsIndustries Technology, Software development

Question

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.