Claim◆Article
If events on different machines are ordered by comparing timestamps, a small difference in the wrong direction can change the result.
Ordering events by timestamps across machines is fragile: a small clock skew in the wrong direction silently produces wrong results. ✦ AI generated
Author · ByteByteGo Newsletter · 2026-07-23 · original ↗
If events on different machines are ordered by comparing timestamps, a small difference in the wrong direction can change the result.
Read full article ↗excerpt · fair-use quotation
- ·Events on different machines ordered by comparing timestamps
- ·Small clock skew in the wrong direction silently flips the order
- ·Wrong ordering produces incorrect results
- ·No external signal warns of the failure
- ·Each machine's clock drifts independently
- ·Even sub-millisecond skew can reverse the intended event order
- ·Causality is lost when timestamps are the only signal
Around this claim
Mechanism · 2
Each machine can read time from its own hardware clock, but those clocks do not stay aligned. Network Time Protocol (NTP) tries to bring the clocks together, but it cannot eliminate the problem.Author · ByteByteGo Newsletter · conf 95%On a single computer, every event can be measured against one clock, so the order of the events is never in doubt. However, a distributed system, where work is spread across many independent machines, lacks a shared reference.Author · ByteByteGo Newsletter · conf 90%
This moment responds to
explains mechanism → An update that happened later can be discarded in favor of an earlier one, because clock differences gave the earlier write the larger timestamp, and the newer data disappears with no error raised.Author · ByteByteGo Newsletterexplains mechanism → Logs gathered from several machines can place an effect before its cause, which makes tracing a problem much harder.Author · ByteByteGo Newsletterexplains mechanism → An operation that depends on a correct order, such as granting access only after the change that authorized it, can act on stale information.Author · ByteByteGo Newsletter