Part 4 of 5 · 2 min read
Sloppy quorums and hinted handoff
When too few of the usual nodes are reachable, a write can go to different, available nodes instead, later handed off to the right ones.
Sloppy quorums and hinted handoff
Think of a delivery service that finds a package's intended recipient temporarily unreachable. It leaves the package with a trusted neighbor instead. The neighbor later passes it along to the actual recipient once they are reachable again.
In plain words: a sloppy quorum allows a write to succeed using nodes other than the ones that would normally be responsible for that specific data, used when not enough of the usual nodes are currently reachable to satisfy a normal write quorum. This improves availability, since a write can still succeed despite some of the usual nodes being temporarily unreachable, at the cost of needing extra bookkeeping to eventually correct the data's location. Hinted handoff is exactly that correction: once the usual nodes become reachable again, whichever node temporarily accepted the write on their behalf forwards that data to them.
A worked example. A write intended for nodes A, B, and C finds C temporarily unreachable and instead uses node D via a sloppy quorum; once C comes back online, D forwards the write to C via hinted handoff, completing the data's intended placement.
The key lines. No new SQL; sloppy quorums and hinted handoff are internal availability mechanisms of a leaderless replication system, triggered automatically when the usual nodes are unreachable.
Sloppy quorum, hinted handoff
A sloppy quorum lets a write succeed using nodes other than the usual ones when too few of the usual nodes are reachable, improving availability; hinted handoff later forwards that data to the correct nodes once they become reachable again.
Example: a delivery left with a trusted neighbor when the intended recipient is unreachable, later passed along once the recipient is available, mirrors a sloppy quorum and hinted handoff together.
Remember this
Leaderless replication removes the single point either single-leader or multi-leader replication still relies on, replacing it with a vote count. Quorum sizes directly trade off consistency against availability, and sloppy quorums push that trade even further toward availability when the usual nodes are temporarily unreachable.
Quick notes
- Leaderless replication has no designated leader; a client sends writes and reads directly to several nodes at once.
- A write quorum (w) is the minimum number of nodes that must confirm a write to succeed.
- A read quorum (r) is the minimum number of nodes that must respond to a read.
- Choosing w plus r greater than the total replica count guarantees a read overlaps with any successful write.
- A sloppy quorum trades some consistency for availability when too few of the usual nodes are reachable, corrected later by hinted handoff.