December 2023
Intermediate to advanced
464 pages
12h 35m
English
Servers often need to have some sense of temporal ordering to figure out which server holds the latest data and which has stale data. It might appear that we can use system timestamps to order a set of messages, but we cannot. The main reason we cannot use system clocks is that system clocks across servers are not guaranteed to be synchronized.
A time-of-the-day clock in a computer is managed by a quartz crystal and measures time based on the oscillations of the crystal. This mechanism is error-prone: Crystals can oscillate faster or slower, so different servers can have different times. The clocks across a set of servers are synchronized by a service called NTP. This service periodically checks a set of ...