A physical clock measures elapsed or calendar time through a physical process. In distributed systems, each component uses an imperfect actual clock rather than a hypothetical perfect wall clock. section 2.2.3
Two imperfections make timestamps from different components difficult to compare:
- Clock skew is a fixed time difference between clocks. section 2.2.3
- Clock drift is a difference in tick frequency that causes clocks to diverge over time. section 2.2.3
- NTP mitigates both problems by having clients adjust their clocks toward an NTP server’s reading. section 2.2.3
Two clocks
Two clocks may begin five minutes apart and preserve that offset, showing skew; or begin together and gradually separate, showing drift. Adjusting a clock backward can make time appear to move backward, motivating time-of-day and monotonic clocks. section 2.2.3
Visualizes two clocks maintaining a fixed time difference. section 2.2.3
Visualizes two clocks gradually diverging because their tick frequencies differ. section 2.2.3
