Course contentsShow
← System Design
Lesson 375 of 1,91910. NoSQL: Key-Value StoresFree lesson

Sloppy Quorum and Hinted Handoff

How Dynamo maintains availability during failures by accepting writes to any available nodes with hints.

Sloppy Quorum and Hinted Handoff

You'll learn how Dynamo maintains availability during node failures by relaxing quorum rules and tracking temporary writes.

The Problem with Strict Quorums

In a strict quorum system, if you need to write to 3 specific replica nodes but one is down, the write fails. This hurts availability—exactly what Dynamo was designed to avoid.

What Is a Sloppy Quorum?

A sloppy quorum relaxes the rule: instead of requiring writes to reach specific replica nodes, Dynamo accepts writes to any available nodes in the cluster. If Node A is down, Node D (not normally a replica for this key) can temporarily accept the write.

Analogy: Imagine a package delivery where your neighbor signs for your parcel when you're not home, rather than the delivery failing entirely.

Hinted Handoff: The Cleanup Step

When Node D accepts a write meant for Node A, it stores a hint alongside the data: "This belongs to Node A." This is the hinted handoff.

Once Node A recovers, Node D automatically transfers the data back to its rightful owner and deletes its temporary copy. The system "heals" itself.

Why This Matters

  • Always-writable: Writes succeed even during failures
  • Availability over consistency: Temporary inconsistency is acceptable
  • Self-healing: No manual intervention needed after recovery
  • Trade-off: Data may temporarily live on "wrong" nodes

The Availability Promise

With sloppy quorum, Dynamo can accept writes as long as any W nodes in the entire cluster are available—not just the designated replicas. This is crucial for Amazon's "shopping cart must always work" requirement.

Key Takeaway: Sloppy quorum and hinted handoff sacrifice strict data placement for maximum availability, allowing writes to succeed during failures by temporarily storing data on substitute nodes with recovery hints.