Issues in Distributed Systems (3): agreeing on time

SystemDesign
Tech Wrench
Published in
6 min readMar 31, 2023

--

PREV | HOME | NEXT | System Design Resource List

Don’t forget to get your copy of Designing Data Intensive Applications, the single most important book to read for system design interview prep!

Check out ByteByteGo’s popular System Design Interview Course

Consider signing-up for paid Medium account to access our curated content for system design resources.

Introduction

When working on a single machine, there’s a single source of truth for time, which is the machine’s internal clock. This clock is often a quartz crystal oscillator.

If the machine’s clock is faster or slower than the actual time, measuring duration of time on a single machine will still be correct since it involves computing the difference between two points in time (assuming the clock is never reset). However, determining a particular instant on the timeline, e.g. a timestamp, may or may not be correct if the machine’s internal clock is not synchronized with the actual time. Though if all the events occurring on the machine are time stamped without the clock being reset, an ordering among the events can still be established.

If you are interviewing, consider buying our number#1 course for Java Multithreading Interviews.

--

--