System design interview questionMediumBasic System Component
Design a Distributed ID Generator
Design a distributed ID generator: many services need unique IDs fast, without a single global lock bottleneck.
Interview scope
Show Client β Gateway/LB β App generators, plus Cache and/or DB for coordination/persistence β not Client β DB only.
Functional requirements
- Issue unique IDs to callers (apps/services).
- Work correctly when multiple generator nodes run at once.
- IDs should be roughly sortable/time-ordered at Easy level (nice-to-have, not mandatory on canvas).
Scale and quality goals
- Very high QPS for ID allocation.
- Avoid βone SQL AUTO_INCREMENT rowβ as the only design under huge write load.
- Generators should survive node restarts without mass collisions.
Capacity assumption
Design for this scale
Assume ~100k ID requests/second peak across several generator app nodes.
Practice more than a diagram
Place components on the Froquiz canvas, connect the data flow, and see which decisions the scenario-specific review finds missing. The full exercise and review unlock with Premium.
Explore Premium β