CAP Theorem
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)?
Both nodes hold V = 10. A client is about to write V = 11 to node A.
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 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 hereChooses availability (AP)
Drop items hereQuiz
20 questionsDuring 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.