Why it matters
Time in distributed systems is subtle. Lamport clocks provide safe ordering; understanding matters for correctness.
Advertisement
The architecture
Rules: increment on local event; when sending, include timestamp; when receiving, set clock = max(local, received) + 1.
Produces total order consistent with causality.
Advertisement
How it works end to end
Total order: tiebreak by node ID for identical timestamps.
Limitations: can't detect concurrent events (both happen 'at same time').
Vector clocks fix concurrent detection at cost of size.