A consistency model is a contract between a storage system and its clients: given the reads and writes that actually happened, which return values are legal? The strongest useful contract is linearizability: the system behaves as if there were one copy of the data and every operation took effect atomically at some instant between its start and its completion. Its practical bite: once any client has seen a value, every later-starting read must see it (or something newer).
Play the referee
Legal or violation?
Each history shows operations with real-time spans (start … end). Rule on whether the history is linearizable, then check your verdict. The third one is the famous trap.
History 3 is the one that catches everyone: overlapping operations may be ordered either way — linearizability only forbids contradicting real-time order that actually completed, and once a new value has been returned to anyone, time may not run backwards for anyone else. That "single timeline all clients share" is exactly what quorum reads/writes (replication course, lesson 3) do not automatically give you, and why CP systems route linearizable reads through a leader or a read-quorum with extra care.
The price list
Weaker contracts are cheaper. Sequential consistency drops the real-time requirement (everyone sees the same order, not necessarily a timely one). Causal keeps only Lesson 2's happened-before order — concurrent writes may be seen in different orders by different clients. Eventual promises only convergence, someday. Each step down buys latency and availability, and the currency in which you pay is client-visible anomalies: stale reads, out-of-order effects, the vanished comment from the replication course. Choosing a model is choosing which anomalies your product can absorb.
CAP: the choice you only make during a partition
The CAP theorem is narrower and sharper than its reputation: when a network partition happens (and Lesson 1 guarantees it eventually will), a system must choose between Consistency (linearizability) and Availability (every node answers). Not in general — during the partition. Make the choice yourself:
The partition is live. Choose.
Two datacenters replicate a key; the link just died. Clients are writing on both sides. Pick a policy and watch a minute of consequences.
EU writes
—
US writes
—
after healing
—
PACELC — the honest version: CAP is silent about the 99.99% of time with no partition, which is where the daily bill arrives. PACELC: if Partition, choose A or C; Else, choose Latency or Consistency. A linearizable system pays coordination latency on every operation, sunny days included — a majority round-trip (etcd, Spanner) or a leader hop. DynamoDB and Cassandra are PA/EL (available and fast, weaker contract); Spanner and etcd are PC/EC (consistent always, latency always). "Is this system CP or AP?" is a worse question than "what does it pay when the network is fine?"
Check yourself
1. Client A writes x=5 and gets an ack. Client B then reads x and gets 5. Client C then reads x and gets the old value 3. Which contract did the system just break, at minimum?
This is the referee lab's trap in prose. Eventual consistency happily permits it (convergence has no deadline). But any system claiming linearizability broke its contract the instant C's later read returned the past that B's read had already left behind.
2. "MongoDB is CP, Cassandra is AP" — what's wrong with this popular shorthand?
Real systems occupy a dial, not a letter: Cassandra at QUORUM/QUORUM behaves very differently from ONE/ONE; MongoDB with w:1 happily loses acknowledged writes. PACELC plus "read the specific configuration" beats the two-letter sticker every time.
3. Your product is a collaborative doc editor. During a partition, users on both sides keep typing. Which choice did the product just make for you, and what must the system now include?
Nobody ships an editor that freezes when the Wi-Fi blips — the product demands availability, which entails accepting divergence, which entails merge machinery (vector clocks to detect concurrency, CRDTs/operational transforms to converge). The stack of this course's lessons is exactly what "just let both sides type" costs.