Overview
Design a service that issues 64-bit IDs across hundreds of nodes. Each ID has to be unique and roughly sorted by creation time.
Requirements
- 01Generate IDs that are unique across every node and data center
- 02Fit each ID in a 64-bit integer, so it works as a primary key
- 03Sort IDs roughly by creation time
- 04Generate 100,000+ IDs a second per node
- 05Have no central point of failure, at 99.999% availability
Concepts in play
SnowflakeBit ManipulationHigh AvailabilityTime Sortable