CoursesBuilding Scalable Services
Partitioning and Rebalancing
How keys find their partition, what moves when a node joins, the query that names no key, the write that spans two partitions, and the tenant that is bigger than the rest combined.
- Lessons
- 6
- Exercises
- 35
- Minutes
- 39
- 1
What Moves When a Node Joins
After this lesson you can say how many keys move when a partition is added under naive hashing and under consistent hashing, and why virtual nodes keep the load even.
Multiple choiceShort answerTrace - 2
The Query That Names No Key
After this lesson you can say what a query costs when it does not name the partition key, choose between a scatter-gather and a secondary index, and refuse the design that asks every partition on every request.
DebugMultiple choiceShort answerTrace - 3
The Write That Spans Two Partitions
After this lesson you can recognise a write that touches two partitions, say why it cannot be one transaction, and restructure it so each step is a single-partition write with a safe retry.
DebugMultiple choiceTrace - 4
The Tenant Bigger Than the Rest
After this lesson you can choose a tenant's placement by its size, isolate the noisy one, and move a tenant between partitions without stopping it.
DebugCode orderMultiple choiceTap - 5
Checkpoint: Partitioning and RebalancingCheckpoint
Rings, keyless queries, cross-partition writes and tenants for a system you have not seen before.
DebugMultiple choiceShort answerTapTrace - 6
Boss: The Multi-Tenant StoreBoss
One design carried from the ask to the incident: the question, the estimate, the key, the placement, the node that joined at peak, the giant that slowed 900 neighbours, the revised placement, and the tradeoff you have to defend.
Code orderMultiple choiceShort answerTrace