Distributed ID sequencer
Your task
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.
It covers
- Sequencer
- Sharding
- Monotonicity