Code RoomHighly available rate-limit aggregator
MediumPrep Room Coding #3342

Highly available rate-limit aggregator

System designReliability & on-callDistributed systemsMid–Senior~40 min

Design a highly-available singleton service: a global rate-limit/quota aggregator that must have exactly one active instance computing the authoritative cross-region usage total (so quotas aren't double-counted), but must fail over to a standby within seconds if the active dies. It also can't be a bottleneck — thousands of services report usage to it. How do you elect the one active instance, fail over fast, and not lose counts during the switch?

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.