Layer 1: ownershipConsistent hash ring:owner = first token clockwisewrap on ring enddeterministic tie-breaks for duplicate positions3 / 7
Layer 2: replica placementRing walk from owner:distinct nodes onlydeterministic orderprefer failure-domain diversity (zone/rack)4 / 7
Layer 3: rebalancingMove shards only when it helps.Constraints matter:move budgetpinned shardsmonotonic improvementoscillation avoidance5 / 7
Key pitfallsrepeated replicas on same node/domainunstable tie-breaksmoves that worsen max-min gapendless rebalance loops6 / 7
Exercise progressionOwnership resolverDomain-aware replica plannerConstrained rebalance capstone7 / 7