Availability in CAP Context
What you'll learn: You'll understand what "availability" actually means in the CAP theorem—it's not just uptime, but guaranteed responses.
The Core Idea
In the CAP theorem, availability has a very specific definition: every request to a non-failing node must receive a response, even during a network partition. Notice what's missing—there's no promise that the response contains the most recent data.
This is different from typical "uptime" availability. A system can be "up" but still fail the CAP definition of availability if it refuses to respond because it can't guarantee fresh data.
The Guarantee
Imagine a library with two branches connected by an unreliable courier service (the network). When the courier can't deliver updates between branches:
- CAP Availability = Both branches stay open and answer questions using whatever information they have locally, even if it's outdated
- Not CAP Available = A branch closes its doors (refuses requests) until the courier connection is restored
An available system in CAP terms promises: "I will always give you an answer, but during partitions, I can't promise it's the latest answer."
The Trade-off
When you choose availability during a partition, you're saying: "Better to give potentially stale data than no data at all." This works well for systems where approximate answers are acceptable—like social media feeds, product catalogs, or DNS lookups.
The system remains responsive, but temporary inconsistencies appear across partitions until they heal.
Key Takeaway: CAP availability means guaranteed responses from all reachable nodes, accepting that those responses might not reflect the most recent writes during network partitions.