Distributed Systems

Vector clock

Per-node logical counter; comparing two clocks tells you happens-before vs concurrent.


In plain terms

Generalises Lamport timestamps. Dynamo used vector clocks for conflict detection; modern systems often prefer dotted version vectors or hybrid logical clocks.

Origin

Colin Fidge and Friedemann Mattern independently introduced vector clocks in 1988. Generalises Lamport timestamps to detect concurrent (vs causally-ordered) events.

Where it shows up in production
  • Amazon Dynamo Used vector clocks for conflict detection on writes. Successors often switched to dotted version vectors.
  • Riak Vector clocks track sibling versions during conflicts.
  • Hybrid Logical Clocks CockroachDB / YugabyteDB combine wall clock + vector-clock-like counters.
Sources & further reading
Found this useful?