Shard a Database

Talk it through out loud with your AI coach.

The problem

  • hard
  • Pro

Your multi-tenant app's single database can no longer handle the write load, even on the biggest machine available. Explain what sharding is, how you'd choose a shard key, and what gets harder once data is split.

What a strong answer covers

  • What sharding is and why it spreads write load.
  • How to choose the key that decides where each row lives.
  • Ways of mapping keys to shards and what happens when shards are added.
  • The everyday operations that become harder once data is split.

Common mistake: Picking a shard key without checking for uneven tenants, so one shard ends up doing most of the work.

Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.

Practise it out loud