IntermediateAbout 15 min

    CAP Theorem

    Read the full article on Substack

    6 min read.

    Visualize the trade-offs between Consistency and Availability when a Network Partition occurs in a distributed system.

    Think of it this way: Imagine two receptionists (Node A & B) answering phones for the same company. If their internal intercom breaks (Partition), and a customer calls Node A to change their address, Node A must decide: Do I refuse the update until the intercom is fixed (Consistency), or do I take the update now, knowing Node B will give out the wrong address to the next caller (Availability)?

    ClientNode AV = 10Node BV = 10Client 2

    Both nodes hold V = 10. A client is about to write V = 11 to node A.

    0 / 5

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    CP or AP during a partition?

    Sort

    Sort each behaviour or system by the choice it makes when the network splits.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    Chooses consistency (CP)

    Drop items here

    Chooses availability (AP)

    Drop items here
    6 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    During a network partition, if a distributed database chooses to prioritize Availability (AP), what is the primary risk?

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going