Spectrum of Consistency Models 00:00:01 A read begins after the receipt arrives An operator changes a register from zero to one. Mark the instant the writer hears success. What may a later reader see if no further write occurs? A client asks to set register X to one. All replicas currently hold zero, and replica one leads. The leader sends the write to both followers. Replica 2 has stored it: 2 of 3. Replica 3 is slower. Only now is the client told done. The leader confirms that it still leads and returns 1. A read never returns 0 again. Linearizability gives completed operations a single order compatible with real time. The pictured leader verifies its authority, which matters when a former leader can still receive requests. 00:00:53 Two readers briefly see different values Use the same register with local acknowledgment and asynchronous propagation. One reader reaches a copy that still holds zero. Follow the value as communication resumes. The client asks its nearest replica to set register X to one. Replica 1 stores it at once. The client is told done although two replicas do not know it. Another reader gets 0. Replica 2 has it. Replica 3 is still behind. All copies hold 1. Eventual convergence requires updates to settle and reach healthy copies under the protocol. Eventual consistency alone sets no numerical maximum for how long an individual reader sees old data. 00:01:39 Deliver the reply after its cause A reader observes the first message and then writes a reply. At the third replica, the reply arrives first. Predict whether the interface can show it immediately. Client one sets register X to one. Its clock records one event from client one, and replica one holds that update. Replica two receives the X update. Client two reads it and sets register Y to two. Its clock records one event from client one and one from client two. The Y update depends on the X update. Replica three receives the Y update before the X update. It holds the dependent Y update back. The missing X update arrives. Replica three can now show X first and Y second. No reader sees the dependent Y update without first being able to see its cause, the X update. A causal system tracks the dependency and delays exposure until the prerequisite is visible. Truly independent actions need not appear in the same order to every observer. 00:02:42 Carry your receipt to the next read A user saves version seven and refreshes beside a replica that has only reached six. The session can carry a progress requirement to its next destination. The write goes to replica 1 and returns version 7. Replica 3 is nearest but at version 6. It is skipped. Replica 2 has caught up to 7 and answers. If all replicas were behind, the leader would answer. Session guarantees follow the participating session. To carry that promise across devices or a new login, the service must preserve or transfer the relevant progress information. 00:03:18 Which combined history is legal Two programs each write one variable and then another. Look for a single order that respects each program's own sequence, even when the two programs interleave. Program one writes one to register X and then two to register Y. Program two writes three to X and then four to Y. One legal sequence runs program one first. X becomes one, Y becomes two, X becomes three, and Y becomes four. Another legal sequence starts with program two setting X to three. Program one sets X to one, program two sets Y to four, and program one sets Y to two. Both programs still write X before Y. Putting program one’s write of two to Y before its write of one to X reverses that program’s own order. Sequential consistency preserves each participant's program order in a common history. Linearizability additionally respects the real-time order of nonoverlapping operations across participants.