Code RoomDistributed rate limiting proxy
MediumPrep Room Coding #3758

Distributed rate limiting proxy

System designNetworking & APIsDistributed systemsMid–Senior~40 min

Design a reverse proxy that protects a public API with distributed rate limiting across a fleet of 200 proxy nodes handling 80k requests/sec. Limits are per-API-key (e.g., 1,000 req/min) and per-IP, must be accurate enough that a key can't get 200x its limit by spreading across nodes, and must add under 2ms p99. It also needs burst tolerance, a global kill-switch for abusive keys, and graceful behavior when the shared counter store is briefly unavailable. Walk through the limiter design, where state lives, and the core trade-off.

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.

Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.