Sloppy Quorums and Hinted Handoff
What you'll learn: How systems maintain write availability during node failures by temporarily relaxing quorum requirements.
The Problem with Strict Quorums
In leaderless replication systems (Dynamo-style), you typically need to write to N nodes to satisfy a quorum. But what happens when some of those nodes are unavailable? A strict quorum would reject the write, reducing availability.
How Sloppy Quorums Work
A sloppy quorum relaxes the requirement: instead of writing to the "correct" N nodes for a key, the system accepts writes to any N healthy nodes in the cluster, even if they don't normally store that data.
Think of it like mailing a package: if your neighbor isn't home, you give it to their other neighbor who is home, with a note saying "please deliver this when they return."
The Handoff Process
When you write with a sloppy quorum:
- Write phase: Data is written to N available nodes (not necessarily the "right" ones)
- Hint storage: The temporary nodes store a "hint" that this data belongs elsewhere
- Hinted handoff: When the originally intended nodes recover, the temporary nodes replay the writes back to them
- Cleanup: The hints are deleted from the temporary nodes
Trade-offs
Advantages:
- Higher write availability during failures
- System keeps accepting writes even with partial outages
Disadvantages:
- Temporarily inconsistent: reads might miss recent writes until handoff completes
- Not a true quorum in the strict consistency sense
- Requires monitoring and repairing hint backlogs
Key Takeaway: Sloppy quorums prioritize availability over consistency by allowing writes to temporary nodes during failures, with hints ensuring data eventually reaches its proper home nodes.