Data & storage · Intermediate · 9 min

Sharding

Choose a routing key, then handle skew and operations spanning partitions.

STEP 1 / 9
Outgrow one write owner — isometric concept diagramPartitioning and replication solve different constraints. Components: 1. Application. Logical component or processing boundary; 2. Shard A. Durable or explicitly scoped state. Connections: 1. Application to Shard A: Outgrow one write owner; 2. Shard A to Application: Reply: Shard A. Illustrations are conceptual, not deployed capacity or user counts.Application → Shard A: Outgrow one write owner1Shard A → Application: Reply: Shard A2Application: Logical component or processing boundary1ApplicationLogical component or processingboundaryShard A: Durable or explicitly scoped state2Shard ADurable or explicitly scoped state
1Application2Shard A
  1. 1Application → Shard ARequestOutgrow one write owner
  2. 2Shard A → ApplicationReplyReply: Shard A

Conceptual illustration · figures do not imply user counts, deployed capacity or replica counts.

2 components visible · Application + Shard A highlighted

Orange: request / query · Blue: reply · Purple: event / control · Arrows show direction; speed is illustrative.

You’ll learn

  • A good key reflects the workload’s access patterns.
  • Routing metadata is part of the serving path.
  • Moving ownership requires a transition protocol.

PUT THE IDEA TO WORK

From learning to practice

RELATED PATTERNS

Explore architecture patterns ↗

Further reading

Microsoft · Sharding pattern ↗