Sequential Consistency vs Linearizability
What you'll learn: How sequential consistency differs from linearizability, and why the real-time ordering guarantee matters.
The Core Difference
Both sequential consistency and linearizability are strong consistency models, but they differ in one critical way: real-time guarantees.
Sequential consistency guarantees that all operations appear to execute in some sequential order, and that this order respects the program order within each individual process. However, it doesn't promise that this order matches the actual wall-clock time when operations occurred.
Linearizability goes further: it guarantees that operations appear to execute in a sequential order that also respects real-time ordering. If operation A completes before operation B starts (according to wall-clock time), linearizability ensures A appears before B in the global order.
Analogy: The Meeting Minutes
Think of taking meeting minutes:
-
Sequential consistency: You write down what each person said in an order that makes sense for each speaker's statements, but you might record Alice's 3pm comment after Bob's 3:05pm comment if it helps the narrative flow.
-
Linearizability: You write down statements in exact chronological order—if Alice spoke at 3pm and Bob at 3:05pm, Alice's comment must appear first, no exceptions.
Why It Matters
Sequential consistency allows more implementation flexibility (better performance) because you don't need synchronized clocks across nodes. Linearizability provides stronger guarantees that match human intuition about "what happened when," but requires tighter coordination.
Key Takeaway: Sequential consistency preserves each process's operation order but allows reordering across processes; linearizability additionally enforces real-time ordering, making it the stronger (and costlier) guarantee.