Server racks, representing the CAP theorem.

A trade-off at the heart of distributed data stores.

What the CAP theorem is

The CAP theorem is a principle about distributed data stores, which spread data across multiple machines. It states that such a system can provide at most two of three guarantees at the same time: consistency, availability, and partition tolerance. In other words, when designing a distributed data store, you cannot have all three simultaneously and must make trade-offs among them.

Consistency

In the CAP theorem, consistency means that every read receives the most recent write or an error. In a consistent system, all the machines agree on the current data, so whenever you read, you get the latest value. This ensures that different parts of the system do not return conflicting or outdated information, which is important when correctness of the data is critical.

Availability

Availability means that every request receives a response, without the guarantee that it contains the most recent data. An available system always answers, even if some machines are having trouble. This keeps the system responsive and usable at all times. The emphasis is on always getting an answer, rather than on that answer necessarily reflecting the very latest state.

Partition tolerance

Partition tolerance means the system continues to operate even when network problems prevent some machines from communicating with others, a situation called a partition. Because networks can and do fail, distributed systems often must tolerate partitions. The CAP theorem highlights that when a partition happens, a system must choose between staying consistent and staying available, since it cannot fully guarantee both.

The trade-off

The heart of the CAP theorem is that you cannot have consistency, availability, and partition tolerance all at once. Since partitions are a reality in distributed systems, designers often must choose, during a partition, between prioritizing consistency or availability. Understanding this trade-off helps explain why different distributed data stores behave differently and are suited to different needs.

Why it matters

The CAP theorem is a foundational idea in distributed systems. Understanding what it is - that a distributed data store can guarantee at most two of consistency, availability, and partition tolerance - clarifies the trade-offs behind how such systems are designed. For anyone interested in distributed systems, it is a valuable concept to understand.

See also: What is eventual consistency? Explained, What is strong consistency? Explained.

Sources

Published date reflects the original event date (2025-11-25). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.

Skillo Staff

Skillo Staff

All stories by: Skillo Staff

Leave a Reply