Loading
0x40Lesson 5 of 9

Apply CAP and quorum reasoning

Make the consistency and availability trade-off concrete during a partition.

14 min 5-question quiz
By the end of this lesson you can
  • State CAP precisely and calculate simple read/write quorum overlap.

CAP applies when a network partition prevents nodes from communicating: a system must choose whether to reject or delay some requests to preserve a single-copy consistency guarantee, or answer requests on both sides and risk divergent results. Partition tolerance is a practical condition for networked systems, not a feature you can switch off. Quorums offer a related tool: with N replicas, read quorum R and write quorum W overlap when R + W > N, assuming the protocol and failure model support that guarantee.

The arithmetic shows overlap, not a complete consistency proof. Real guarantees depend on versions, leader rules, concurrent writes, membership changes, and which failures the protocol tolerates.

Practice: find a quorum that overlaps

Try it

Up to 15 XP

Tune R and W

This shows the worst case: a write reaches only the first W replicas, and a read asks only the last R.

  1. Start at W=1 and R=1. Can a read miss the new value?
  2. Find settings where they always overlap.
  3. Click replicas to take them down. How many can you lose with W=5, R=1? With W=3, R=3?

Each tile is a replica: “new” holds the latest write, and “read” is where a read asks. Click a tile to take that replica down.

A read can miss the new value completely, because R + W isn’t greater than N.
Writes work. Reads work.

Try it

Up to 15 XP

During a partition: answer or refuse?

The network has split, and this node can’t reach the others. Decide what the right behavior is for each system.

0 of 5 sortedScore 0/0
  • “A shopping cart.”

  • “Booking the last seat on a flight.”

  • “A social media feed.”

  • “Transferring money between accounts.”

  • “Counting page views.”

Key takeaways

  • CAP is a choice made during a partition, not a universal label for normal operation.

  • Quorum overlap is useful arithmetic, not a complete proof.

  • State which reads and writes your consistency claim covers.

Lesson quiz

5 questions · pass with 4 correct · up to 50 XP

Passing this quiz completes the lesson and keeps your streak going. Questions you miss come back in review sessions later.

Questions about this lesson

Stuck? Ask. Figured something out? Share it. Explaining is one of the best ways to learn.

Loading posts…