Problem Statement
Which ID strategy avoids shard hotspots while keeping order within a shard?
Explanation
Snowflake-like IDs embed time and shard bits. They are k-sortable per shard and avoid a global sequence bottleneck.
Pure UUID v4 distributes well but is not ordered; global sequences create a single hot writer.
Code Solution
SolutionRead Only
id = (timestamp<<22) | (shard<<12) | sequence
