Sharding
1 min readOct 21, 2021
- English dictionary meaning of shard is fragment.
- In database terminology it refers to data distribution across multiple machines — a form of horizontal scaling or scale out.
- Sharding can be applied to databases as well as software architectures.
- Pros for database sharding:
Increased Read/Write Throughput.
Increased Storage Capacity.
High Availability. - Cons for database sharding:
Query Overhead.
Complexity of Administration.
Increased Infrastructure Costs. - Some database sharding architectures and types:
Ranged/Dynamic Sharding.
Algorithmic/Hashed Sharding.
Entity-Relationship-Based Sharding.
Geography-Based Sharding. - Sharding can be considered if your core application database contains large amounts of data, requires high read and high write volume, and/or you have specific availability requirements.
- Some alternatives to database sharding:
Functional Partitioning.
Replication.
Caching and Queueing.
Supplemental Technologies.
References and further reading: