Sharding is a method for horizontally scaling databases by partitioning data into smaller, manageable pieces, known as shards. It can be implemented logically within the same server or physically across different servers. Key-based, range-based, and directory-based sharding are some strategies used depending on the needs. Each has its benefits and drawbacks, and the choice depends on whether read or write optimization is prioritized. Sharding can help improve performance by reducing the quantity of data each query needs to handle but also introduces complexity and potential hotspots.

7m read timeFrom newsletter.systemdesigncodex.com
Post cover image
Table of contents
Logical vs Physical ShardingSharding StrategiesBenefits and Drawbacks of ShardingBefore Adopting ShardingShoutout
3 Comments

Sort: