Cianplan

Level 2: Data · L2.3 Partitioning / sharding & consistent hashing

Hot keys, secondary indexes and rebalancing

Mitigate hot partitions and compare local vs global indexes.

13 min · Pro

What you take away

  • Hashing spreads keys, not traffic — one popular key is one partition however you hash it.

And 3 more inside the class, in Pro.

How the class is laid out

  1. The problem
  2. The simple version
  3. Fixing hot keys
  4. Local versus global secondary indexes
  5. Rebalancing without moving everything
  6. When to shard
  7. Range vs hash
  8. Consistent hashing
  9. Hot keys and indexes
  10. Rebalancing
  11. Check your understanding