Ram
All topicsTopic 17 / 24
Intermediate 1 minute

Replication vs Sharding

Replication keeps the same data on multiple nodes. Sharding divides different records across nodes. Replication helps availability and read scale, while sharding helps a dataset or write workload exceed one machine. Systems often combine them: each shard can have replicas. The distinction matters because each solves a different bottleneck and adds different failure modes.

Key idea

Replication copies data; sharding divides data.

See it in one picture

Follow the arrows

Real-world example

A social network can shard users by user ID to spread writes, then replicate every shard for failover and read traffic. Losing one replica is different from losing an entire shard's only copy.

Quick check

Can you spot it?

0/2 answered
Question 1

1. What does replication do?

Question 2

2. What does sharding target?