AlgoMaster Logo

Clock Synchronization Problem

Medium Priority10 min readUpdated July 4, 2026
AI Mock Interview

Practice this topic in a realistic system design interview

Time feels simple on one machine. In a distributed system, it is not simple at all.

Every machine has its own clock. Those clocks slowly drift apart. The software that tries to fix them also has to talk over the network, and the network is never perfectly predictable.

This matters because engineers often use timestamps to make important decisions:

  • Which write happened last?
  • Has this lock expired?
  • Is this token still valid?
  • What order should we replay these events in?

Wall-clock time is useful, but it is not safe when an important rule depends on exact ordering across machines.

This chapter covers why clocks disagree, when to use wall clocks or monotonic clocks, what NTP and PTP can do, where clock skew causes bugs, and when physical time is good enough.

1. Why Clocks Disagree

Premium Content

This content is for premium members only.