liveBook · Manning

CAP theorem

As explained in ScyllaDB in Action

The CAP theorem states that a distributed data system cannot simultaneously guarantee consistency, availability, and partition tolerance under network partition conditions.

The CAP theorem states that a distributed system cannot guarantee consistency, availability, and network partition tolerance at the same time. Consistency means every request reads the newest write; availability means the system continues serving requests; partition tolerance means it handles disconnected nodes. section 1.2.1

Because distributed systems must tolerate partitions, they choose between consistency and availability during a network split. A consistent system may stop serving requests until replicas receive the required data, while an available system may serve temporarily inconsistent results. section 1.2.1 section 1.4

Consistency levels make the trade-off operational:

  • QUORUM requires a majority of replicas, balancing correctness and availability. section 1.4
  • ONE requires a single replica, preserving service through more failures but allowing weaker consistency. section 1.2.1

ScyllaDB is typically classified as AP: during a partition, it prioritizes availability and may converge through eventual consistency. MongoDB is described as CP because writes wait for a primary during a partition. section 1.2.1 section 1.2.5

How ScyllaDB in Action covers it

How deep it goes
Defines the three properties, explains partition trade-offs, and connects them to replica consistency levels and database behavior.
Examples
Uses ScyllaDB and MongoDB classifications plus ALL, QUORUM, and ONE in a three-replica cluster.
What you can do after
Evaluate database behavior during partitions and select consistency levels according to correctness, availability, and failure-tolerance needs.
How it connects
Links consistency, availability, partition tolerance, replication, quorum, eventual consistency, and the PACELC theorem.

Also explained in

Compare how 4 books explain CAP theorem →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.