Clocks in Distributed Systems: Why You Can’t Trust Timestamps

Many design bugs come from assuming that time is the same on every machine. Interviewers like candidates who know the limits.

Physical clocks drift

Each server’s clock drifts, and NTP corrects it, typically keeping servers within a few milliseconds on a good network, worse across the internet. NTP can also step the clock backward. Consequences:

Logical clocks

Bounded uncertainty

Google Spanner’s TrueTime exposes time as an interval [earliest, latest] using GPS and atomic clocks. A transaction waits out the uncertainty before committing (“commit wait”), which gives globally consistent ordering.

Practical guidance

Interview tip

When you rely on time, say which clock and what happens under skew. It’s a quick way to show depth.

Disclosure: I help build Linkjob AI (www.linkjob.ai/), an AI assistant for technical interviews.