CAP Theorem
The CAP theorem: a distributed data store can provide only two of three guarantees simultaneously.
The CAP theorem: a distributed data store can provide only two of three guarantees simultaneously.
The CAP theorem's three guarantees (consistency, availability and partition tolerance) and what choosing CP or AP implies, extended with the PACELC refinement that describes the latency-versus-consistency trade-off when there is no partition.
| Guarantee | Description | Implication | Tradeoff | Examples |
|---|---|---|---|---|
| Consistency | Every read receives the most recent write or an error. | All nodes see the same data at the same time. | null | null |
| Availability | Every request receives a response, without guarantee that it contains the most recent write. | Every node remains operational. | null | null |
| Partition Tolerance | The system continues to operate despite network partitions. | Messages between nodes may be lost. | null | null |
| null | Sacrifices availability during partitions. | null | CP (Consistency + Partition Tolerance) | HBase, MongoDB (in strict mode), Bigtable |
| null | Sacrifices strong consistency during partitions. | null | AP (Availability + Partition Tolerance) | Cassandra, DynamoDB, CouchDB |
| PACELC (extension) | If there is a Partition, choose Availability or Consistency; Else, choose Latency or Consistency. | Captures that replication costs latency even when the network is healthy. | null | null |
| CA (single node) | Consistency and availability without partition tolerance, achievable only when there is no network partition to tolerate. | Describes a single-node or tightly coupled system rather than a distributed one. | null | null |
The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.
| Section | Field | Type | Example |
|---|---|---|---|
| data | guarantee | string | Consistency |
| data | description | string | Every read receives the most recent write or an… |
| data | implication | string | All nodes see the same data at the same time. |
| data | tradeoff | string | CP (Consistency + Partition Tolerance) |
| data | examples | string | HBase, MongoDB (in strict mode), Bigtable |
The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.
curl "https://yjtoon.yunusemrevurgun.com/api/dataset/cap-theorem?format=toon"
const res = await fetch( "https://yjtoon.yunusemrevurgun.com/static-data/dataset/cap-theorem.toon" ); const toon = await res.text();
Rate limit: 120 requests per minute per IP, no key and no signup. API reference →