Skip to content
StackDecode
System Design
6. Distributed Systems FundamentalsAnimated

Clock Synchronisation

Keeping physical clocks close.

The idea

NTP and PTP adjust clocks, but they still drift by milliseconds or more.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

BrowserResolverRoot.com TLDAuthoritativewhere is example.com?
  • current message
  • earlier
  • failure or attack

The browser asks its recursive resolver (usually your ISP or a public resolver).

step:
1/8
from:
Browser
to:
Resolver
1/8

Time runs downward. Solid arrows are requests, dashed arrows are replies.

Step by step

  1. 1Ask a time server
  2. 2Measure round trip
  3. 3Adjust the clock gradually
  4. 4Repeat

Where it is used

Logs, certificates, expiry.

Watch out for

Clock skew breaks last-write-wins and leases.

Related