Distributed systems enable computation and data storage across multiple independent nodes that coordinate to appear as a single coherent system, powering everything from cloud databases and microservices to content delivery networks and blockchain platforms. As systems scale beyond single machines and geographic boundaries, understanding the fundamental tradeoffs β between consistency, availability, partition tolerance, and latency β becomes critical for architects building resilient global infrastructure. The key mental model: every distributed system is a collection of tradeoffs, not a collection of solutions, and mastering these tradeoffs is what separates reliable production systems from fragile ones.
What This Cheat Sheet Covers
This topic spans 20 focused tables and 158 indexed concepts, 152 flashcards. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: CAP Theorem and Fundamental Tradeoffs
The CAP theorem is the starting point for reasoning about any distributed system, but PACELC extends it by addressing the latency-consistency tradeoff that occurs even in the absence of network partitions β which is the more common operating condition. Understanding BASE versus ACID, and knowing which quadrant a system occupies in the PACELC taxonomy, directly drives architectural decisions.
| Concept | Example | Description | |
|---|---|---|---|
Choose 2 of 3: C+P, A+P | Only two of three guarantees simultaneously possible when a network partition occurs: Consistency, Availability, Partition Tolerance. | ||
PA/EL (Cassandra) vs PC/EC (Spanner) | β’ Extends CAP: during Partition β choose A vs C; Else β choose L (Latency) vs C (Consistency) β’ more practical than CAP for normal operations. | ||
All nodes see same data at same time | β’ Every read receives the most recent write or an error β’ all replicas must agree before responding | ||
Every request gets non-error response | β’ System responds to every request even if some nodes are down β’ may return stale data during partition | ||
System continues despite network split | System operates correctly even when network messages are lost or delayed between nodes. | ||
Traditional relational transactions | β’ Atomicity: all-or-nothing β’ Consistency: valid state transitions β’ Isolation: concurrent execution safety β’ Durability: persisted writes survive failures. | ||
DynamoDB, Cassandra | β’ Basically Available: responds even if inconsistent β’ Soft state: may change without input β’ Eventually consistent: converges over time. | ||
etcd, Consul, ZooKeeper | β’ Prioritize Consistency and Partition tolerance β’ become unavailable during network partition to preserve consistency. | ||
Cassandra, DynamoDB, Riak | β’ Prioritize Availability and Partition tolerance β’ remain available during partition but may return stale data. | ||
Can't guarantee mutual commit over lossy channel | β’ Proves impossibility of reaching guaranteed consensus over an unreliable communication channel β’ motivates Saga, Outbox, and idempotency patterns |