thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Intermediate

CAP Theorem

The principle that a distributed data store can guarantee at most two of Consistency, Availability and Partition tolerance during a network partition.

Definition

Because network partitions must be tolerated, the practical choice during a partition is between consistency (CP: refuse some requests) and availability (AP: answer with possibly stale data). CAP's consistency means linearizability, not ACID consistency.

Example

Cassandra is typically AP; HBase and MongoDB with majority writes lean CP.

Exam tip

Partition tolerance is effectively mandatory, so CAP questions really ask: during a partition, consistency or availability?

Related terms