IT lexicon Database Spanner TrueTime

Spanner TrueTime

Database På svenska → Updated: 2026-05-29

Google Spanner's clock API that gives the time as an uncertainty interval [earliest, latest] instead of a single number, guaranteed by GPS and atomic clocks in every datacenter. It enables global, externally consistent serializability — something long considered impossible.

Idea: instead of pretending clocks are exact, TrueTime explicitly acknowledges the uncertainty (often a few milliseconds) thanks to redundant time hardware. The trick "commit wait": on a transaction, Spanner waits out the uncertainty interval (ε) before committing, so that guaranteed no later transaction got a lower timestamp → global timestamps respect real ordering across the entire planet. This gives "external consistency" (linearizability) for a planet-scale database. Price: special hardware (GPS antennas, atomic clocks) and a small commit latency. CockroachDB/Yugabyte mimic the idea without the hardware via HLC + retries. A landmark in distributed databases (paper 2012). Related to HLC and linearizability.

← Back to the lexicon