Imagine trying to photograph a busy road by taking separate snapshots of each lane at different moments. Some cars appear in two photos; others vanish completely. The picture is useless — it shows a state the road never actually had.
Distributed systems face this exact problem. A bank cluster might run on dozens of servers, each keeping its own local state. At any moment, messages are in transit between them — money wired from one account, a reply still flying through the network. If you want to know the total balance across all accounts, or checkpoint the whole cluster for recovery, you need a globally consistent snapshot: a record of every node's state and every in-flight message, taken at a moment that could have existed in some valid execution.
In 1985, K. Mani Chandy and Leslie Lamport published their landmark algorithm that does exactly this — without stopping the system, locking any process, or coordinating a global clock. Every node keeps running; a lightweight "marker" message ripples through the channels and each node records its own state when the marker first arrives. The messages caught between the marker and the snapshot form the channel state. At the end, the pieces compose into a globally consistent view.
The algorithm is proven correct (Chandy & Lamport, 1985): the resulting global state is a consistent cut — a snapshot that satisfies causality and could appear in a real execution. It runs in time proportional to the number of channels, and it is the foundation of every checkpoint, deadlock detector, and distributed garbage collector built since.
Comments
Loading comments...