- C — Consistency
Every successful write is visible to all subsequent reads: once a write completes, every later read returns that latest value, regardless of which machine handles the request. - A — Availability
Every request receives a response (success or failure); the system continues to answer queries even if some parts are degraded. - P — Partition tolerance
The system continues to operate despite arbitrary network partitions — i.e., communication loss between nodes.
- Keep answering requests on both sides: you preserve availability, but the primary and replicas may diverge (sacrificing consistency).
- Refuse or delay some requests until nodes can agree: you preserve consistency, but some operations become unavailable.

- If you prioritize availability, clients always get a response, but the response may be stale or conflicting.
- If you prioritize consistency, clients see the single latest agreed value, but some requests may be rejected or delayed during partitions.

Example 1 — Likes on a photo:
If a partition causes two users to briefly see 1,000 likes vs 1,001 likes, that small divergence is usually acceptable. Favor availability: keep the app responsive, accept slightly stale counters, and reconcile counts when nodes rejoin.


When designing your system, classify each data type by how costly inconsistency is. Use eventual consistency for user-visible metrics and feed data, but require strong consistency for financial, inventory, or safety-critical operations.
Remember: network partitions are inevitable in distributed systems. Never assume perfect connectivity when making consistency/availability trade-offs for critical data.
- CAP theorem — Wikipedia
- Eric Brewer’s original talk on the CAP intuition (see materials about the Brewer conjecture)
- Martin Kleppmann, “Designing Data-Intensive Applications” — practical patterns for consistency and availability
- Kubernetes — distributed systems patterns overview