Splitting data and the consistency trade-off.
Sharding
Partition data across multiple databases so each holds a subset. Strategies: range-based, hash-based, directory-based. Hashing spreads load evenly; ranges support range queries. Pain points: cross-shard joins, rebalancing and hot shards.
Consistent hashing
Maps keys and nodes onto a ring so adding or removing a node moves only a small fraction of keys, instead of reshuffling everything as hash(key) % N would.
CAP theorem
During a network Partition a distributed system must choose Consistency (everyone sees the latest write) or Availability (every request gets an answer). Partitions happen, so the real choice is CP vs AP. Banks lean CP; social feeds lean AP.