Lesson 12 of 15
15. Sharding

Interview questions

6 min read+10 XP

Interview questions (with the counter-questions you'll get)

Q1. What is sharding, and when would you do it?

They're testing: knowing it's a last resort with real costs.

Think about your answer first, then open it.

reveal

Q2. How do you choose a shard key?

They're testing: the single most important decision.

Think about your answer first, then open it.

reveal

Q3. Range vs hash sharding?

They're testing: trade-offs.

Think about your answer first, then open it.

reveal

Q4. What causes hot shards, and how do you fix them?

They're testing: operational experience.

Think about your answer first, then open it.

reveal

Q5. How do you reshard without downtime?

They're testing: practical migration knowledge.

Think about your answer first, then open it.

reveal

Q6. How do you handle queries that don't include the shard key?

They're testing: cross-shard strategies.

Think about your answer first, then open it.

reveal

Q7. How do you enforce a unique email when users are sharded by ID?

They're testing: a classic gotcha.

Think about your answer first, then open it.

reveal

Q8. How do you do joins and transactions across shards?

They're testing: knowing what sharding takes away.

Think about your answer first, then open it.

reveal

Q9. How do sharding and replication combine?

They're testing: a full picture.

Think about your answer first, then open it.

reveal

Q10. How does a request know which shard to go to?

They're testing: routing options.

Think about your answer first, then open it.

reveal