Database Sharding
Sharding splits a database's data horizontally across multiple independent database servers (shards), each holding a subset of the rows — usually by a shard key like customer ID — so no single server needs to store or serve the entire dataset.
Unlike replication (every replica holds a full copy of the data), sharding divides the data itself: shard 1 might hold customers A-M, shard 2 customers N-Z. This lets both storage and write throughput scale roughly linearly with the number of shards, which replication alone can't do since every replica still needs the full write volume.
The cost is complexity: queries that need data from multiple shards (a cross-shard join or a global aggregate) become much harder, and re-sharding as data grows unevenly is a significant operational project. Most teams reach for read replicas, indexing, and partitioning long before sharding becomes necessary.