Code Room
System designHard
Question
Design a distributed counter / sequencer that hands out globally unique, roughly-ordered 64-bit IDs to ~30 application servers at 1M IDs/sec, with no central bottleneck on the hot path and no duplicate IDs ever — even when a server restarts. Optionally support strictly-monotonic per-key counters (e.g. per-account ledger sequence) too. Describe ID structure, how concurrent issuers coordinate to avoid collisions, and the durability story across restarts.
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.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.