SpinTheMic
Pro

Interview practice question

Sharding a users table

System Design · Databases · Intermediate

Your users table has 2 billion rows and one Postgres instance cannot keep up. How would you shard it?

What a strong answer covers

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

  • Shard by user ID (hash).
  • Many logical shards on fewer physical nodes.
  • Routing layer or library.
  • Global lookups (email → user ID) table.
  • Plan migration with dual writes.
Practise this topic

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

See all topics