Distributed Systems Lab
Eleven ideas that only matter once you have more than one machine.
Snowflake IDs
Unique IDs, no coordination required.
A 64-bit Snowflake ID packs a timestamp, a machine identifier, and a per-millisecond sequence into one number — sortable, unique, and generated with zero coordination between machines.
41b
10b
12b
Sign
0
1 bits
Timestamp
10000000000000000000000000000000000000000
41 bits
Machine ID
0100000000
10 bits
Sequence
001100000000
12 bits
Generated ID
4611686018428437248