System Design
6. Distributed Systems FundamentalsAnimated
Distributed Synchronisation
Coordinating timing and order across nodes.
The idea
Without a shared clock, nodes use logical clocks, locks or consensus to order events.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
Process A a local event: increment its own counter. Timestamp 1.
- event:
- 1
1/9
Lamport timestamps respect cause and effect, but cannot detect concurrency.
Step by step
- 1Identify what must be ordered
- 2Pick a clock or lock
- 3Exchange timestamps
- 4Resolve conflicts
Where it is used
Transactions and ordering.
Watch out for
Never trust wall clocks for ordering.