Clocks are timing are important, especially if our mechanism for detecting faults in a distributed sense comes for timeouts.
Machines all have their own clocks which are not entirely synchronized with one another. There are network time protocols that are used to synchronize clocks to some degree. It should also be noted that clocks drift. better use of clocks use a confidence interval when trying to get a machine’s time of day. Because of the unpredictable nature of clocks, things other than monotonic clocks are not used in distributed systems.

Issues

  • Each machine has their own quartz oscillator and therefore, its own time varies slightly (nodes can lag)
  • Clocks drift
  • Process pauses screw up notions of time
  • NTP clients can be misconfigured causing drift
  • Virtualized hardware clocks in VMs
  • Running software on devices you don’t control means you can’t trust their hardware clock
  • NTP synchronization can only be as good as the network delay

Types of clocks

  • Time of day clocks (instantaneous time)
  • Monotonic clocks (passage of time)