Course contentsShow
← Computer Science
Lesson 2644 of 2,87259. Consensus and ReplicationFree lesson

Quorums and Sloppy Quorums

Understanding quorum requirements (W + R > N) and how sloppy quorums maintain availability during failures.

Quorums and Sloppy Quorums

You'll learn how quorum requirements ensure consistency in leaderless replication and how sloppy quorums trade consistency for availability during failures.

What is a Quorum?

In leaderless replication systems (like Dynamo-style databases), there's no single authority deciding which data is correct. Instead, the system uses quorums to ensure consistency through majority agreement.

The quorum rule is simple: W + R > N

  • N = total number of replicas
  • W = number of nodes that must acknowledge a write
  • R = number of nodes we read from

When W + R exceeds N, the read and write sets must overlap, guaranteeing you'll read at least one up-to-date value. For example, with N=3, setting W=2 and R=2 ensures overlap (2+2 > 3).

Sloppy Quorums: Availability Over Strict Consistency

Sloppy quorums relax this requirement during network partitions. If the designated N nodes are unreachable, the system accepts writes to any available N nodes—even if they're not the "home" nodes for that data.

Think of it like a voting committee: with strict quorums, you need votes from specific members. With sloppy quorums, you accept votes from any available members, even substitutes, to keep the system running.

The catch? Temporarily, you might not have the overlap guarantee—different clients might see inconsistent data until the system performs hinted handoff (returning data to the correct nodes when they recover).

This design choice prioritizes availability (writes never fail) over strict consistency (always reading the latest value), making it an AP system during partitions.

Key Takeaway: Quorums ensure consistency through the rule W + R > N, while sloppy quorums sacrifice strict consistency to maintain availability when designated nodes fail.