Sharding
Sharding horizontally splits a large table across multiple nodes by a shard key, each node storing a portion of the data, enabling horizontal scaling.
Purpose
To design horizontal scaling strategies and overcome single-node capacity and throughput bottlenecks.
Mechanism
Sharding strategies: range sharding (by key interval), hash sharding (hash(key) mod N), directory sharding (lookup-table routing). Cross-shard queries require scatter-gather. Shard key choice affects data distribution and query locality.
Use cases
- Horizontal scaling design
- Sharding strategies
- Distributed databases