Keeping Clocks Honest
NTP (Network Time Protocol) synchronizes computer clocks across a network to within milliseconds. Accurate time matters for logs, certificates, and distributed systems that order events.
Stratum Hierarchy
NTP arranges sources in layers called strata.
- Stratum 0 is a reference clock such as a GPS or atomic source.
- Stratum 1 servers connect directly to those references.
- Each lower stratum syncs from the one above, spreading time outward.
Correcting for Delay
A client records four timestamps as a request leaves and returns. From these NTP computes the round trip delay and the offset between the two clocks, assuming the path is roughly symmetric. Rather than jumping the clock, it usually slews it gradually so time never moves backward.
Key idea
NTP organizes time sources into strata and uses four timestamps to estimate delay and offset, then slews the clock so it stays accurate without jumping backward.