A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Causal Consistency

Research Depth 100 in the knowledge graph I know this Set as goal
5topics build on this
370prerequisites beneath it
See this on the map →
Consistency Models in Distributed SystemsHappened-Before Relation and Causal Ordering+2 moreCRDTs: Conflict-Free Replicated Data TypesStrong Eventual Consistency
causal-consistency consistency causality

Core Idea

Causal consistency is stronger than eventual consistency but weaker than strong consistency: it respects causal dependencies (if write A happened-before write B, all processes see A before B), but concurrent writes can be observed in different orders. This model avoids anomalies like receiving replies before questions while maintaining good availability.

Explainer

From your study of consistency models, you know the spectrum ranges from strong consistency (every read sees the latest write, but at the cost of availability and latency) to eventual consistency (all replicas converge eventually, but reads can return stale or out-of-order data). Causal consistency sits in between, enforcing a specific constraint: if two operations are causally related — meaning one could have influenced the other — then every process in the system must observe them in causal order. Operations that are not causally related (concurrent operations) can be observed in any order.

The intuition comes from everyday conversation. If Alice posts a question and Bob posts an answer, anyone reading the forum should see the question before the answer — because the answer was caused by the question. But if Alice and Carol independently post unrelated messages at roughly the same time, it does not matter whether a reader sees Alice's or Carol's message first. Causal consistency captures exactly this: it preserves the ordering that humans intuitively expect while relaxing ordering constraints on truly independent events.

From your prerequisite on causal ordering, you know that happened-before relationships (Lamport's relation) define which events are causally connected. Causal consistency uses this same structure: if write A happened-before write B (because B read the value written by A, or because B followed A at the same process), then all processes must see A before B. The system tracks these dependencies using mechanisms like vector clocks or explicit dependency lists. When a replica receives an update, it checks whether all causally prior updates have already been applied; if not, it delays the update until the dependencies are satisfied.

The practical appeal of causal consistency is that it avoids the most jarring anomalies of eventual consistency without paying the steep coordination cost of strong consistency. Under eventual consistency, you might see a reply to a message before seeing the original message, or see someone's profile picture change before seeing the post that announced the change. Causal consistency eliminates these anomalies. Meanwhile, unlike strong consistency, it does not require global synchronization — replicas can accept writes independently and propagate them asynchronously, as long as causal dependencies are tracked and respected. This makes it a popular choice for geo-replicated systems where latency between data centers makes strong consistency impractical.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesBinary Counters: Design and AnalysisBinary ArithmeticFixed-Point Number RepresentationTwo's Complement RepresentationOverflow and Underflow DetectionBinary Adders: Half-Adders and Full-AddersFull Adder and Carry PropagationCarry Lookahead Adder DesignHalf Adder Circuit DesignMultiplication Circuit DesignSequential Circuit DesignRegisters and Register FilesInstruction Set Architecture (ISA)Kernel Architecture and OS StructureSystem Calls and User/Kernel ModeProcesses and the Process Control BlockLogical Clocks and Event OrderingVector Clocks and Capturing CausalityHappened-Before Relation and Causal OrderingConsistency Models in Distributed SystemsRead-After-Write ConsistencySequential ConsistencyCausal Consistency

Longest path: 101 steps · 370 total prerequisite topics

Prerequisites (4)

Leads To (2)