Why architecture matters here

HLC failures come from unbounded clock skew, misunderstanding the guarantees, and confusing HLC with vector clocks. Architecture matters because HLC + NTP + skew bounds compose into external consistency.

Advertisement

The architecture: every piece explained

The top strip is construction. Physical time from NTP. Logical counter per-node. HLC timestamp = (pt, l). Update rule: on send take max(local, current); on receive combine.

The middle row is properties. Monotonicity. Causality. Bounded skew. External consistency requires bounded uncertainty.

The lower rows are practice. Use cases. vs vector clocks. Ops — clock sync + observability.

Hybrid Logical Clocks — physical + logical combined + monotonic + causalitythe best of wall-clock and LamportPhysical timewall clock (NTP)Logical counterper-nodeHLC timestamp(pt, l)Update ruleon send / receive / localMonotonicitynever decreaseCausalityconsistent with happened-beforeBounded skewvs true wall clockExternal consistencyrequires bounded uncertaintyUse casesCockroachDB / YugabyteDBvs vector clockscompact + external timeOps — clock sync + bounded skew + observabilityguaranteeencodeboundextendadoptcomparecompareoperateoperate
HLC combines physical + logical time.
Advertisement

End-to-end flow

End-to-end: transaction commits with HLC timestamp (1720394890, 5). Sent to replica. Replica updates its HLC to max. Read at HLC picks correct version. Bounded skew keeps HLC within milliseconds of wall time.