CockroachDB Glossary

Hybrid Logical Clock (HLC) Timestamps

What are Hybrid Logical Clock (HLC) Timestamps?

Accurate time is very important in distributed systems, because events often occur at different nodes at the same time, and these events need to be ordered accurately. Google Spanner uses atomic clocks to accomplish this, but because CockroachDB is open source and can run on any public/private cloud/on-prem, it’d be impossible to use atomic clocks. Instead CockroachDB used HLC, which is a clock method that has logical and physical components. CockroachDB applies HLC timestamps to all transactions so the system knows when they occured and can order them correctly.

Subscribe to our newsletter
Get the latest tutorials, blogs, and case studies sent directly to your inbox