Causality

In a distributed system, causality refers to the cause-and-effect relationships between events. An event can only have been influenced by events that happened before it: a reply can only depend on a message that already arrived, and a computation can only use data that was already written. Causality captures which events could possibly have affected which others, and which are genuinely independent.

Leslie Lamport’s 1978 paper “Time, Clocks, and the Ordering of Events in a Distributed System,” listed on his publications page, made this precise with the happens-before relation. As Lamport describes it, the central idea is the use of timestamps to provide a total ordering of events that is consistent with the causal order. Happens-before is a partial order, because some events are concurrent and have no causal relationship at all, and the challenge is to respect that partial order even when extending it to a full sequence.

Tracking causality is valuable precisely because physical clocks cannot be perfectly synchronized. Rather than asking what time an event happened, a system can record which events it depended on. Logical clocks assign counters that never let an effect appear earlier than its cause, and vector clocks go further by capturing the full partial order, making it possible to tell whether two events are causally related or genuinely concurrent.

This causal bookkeeping is the foundation for ordering events correctly without trusting wall-clock time. It underpins consistency models such as causal consistency, conflict resolution in replicated data, and the ordering guarantees that distributed systems rely on when no global clock can be trusted.

Sources

Last verified June 8, 2026