Why it matters
HLC is used in modern distributed databases. Understanding shapes reasoning about their consistency.
Advertisement
The architecture
Timestamp: (physical_time, logical_counter).
On local event: use max(now(), previous.physical), logical incremented as needed.
Advertisement
How it works end to end
Receive: compare received HLC. Set physical = max of local/received/now. Increment logical if needed.
Bounded skew: HLC and physical never drift far apart.
Applications: CockroachDB uses HLC for MVCC timestamps enabling snapshot isolation.