What sharding is, and what it isn't
Sharding is splitting one logical database across multiple physical nodes, with each node holding a subset of the data. It's a flavour of horizontal partitioning โ different rows live on different machines.
Not the same as:
- Replication: every node has the same data; goal is availability/read scale.
- Vertical partitioning: different columns on different stores (e.g. blob storage for images, Postgres for metadata).
- Caching: a fast layer in front of one database; doesn't change the database's footprint.
The goal of sharding is storage + write throughput beyond what one machine can offer. If your bottleneck is read load, replication is usually the easier answer.
