Why it matters
Sharding enables massive scale. Understanding shapes scale-out systems.
Advertisement
The architecture
Shard key: determines which shard owns data.
Router: directs queries to right shard.
Advertisement
How it works end to end
Shard key choice: even distribution + query alignment.
Hot spots: uneven access. Consider salting or consistent hashing.
Rebalancing: consistent hashing minimizes data movement.
Cross-shard transactions: hard; avoid or use 2PC.