SpinTheMic
Pro

Interview practice question

Generating IDs across shards

System Design · Databases · Intermediate

Your sharded system can no longer use auto-increment IDs. How do you generate unique IDs across all shards?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • UUIDs: simple, random, large.
  • Snowflake-style: time + machine + sequence.
  • Roughly time-sorted, 64-bit.
  • Ticket server or ranges per node.
  • Watch clock skew.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics