Resharding.
also: repartitioning · re-shardingMoving data when partitions are added or removed; with hash mod N nearly every key changes partition.
the two-minute refresher
- hash % 4 and hash % 5 disagree for most keys: going from 4 to 5 partitions moves about 80% of the data.
- That migration costs network, disk and risk, all while serving traffic.
- Consistent hashing cuts it to about 1/(N+1) of the keys.
- Plan resharding from day one: it is far harder on a live system.