Spanner, described by James C. Corbett and colleagues at Google, is a scalable, globally-distributed database. The paper was first presented at the USENIX Symposium on Operating Systems Design and Implementation (OSDI) in 2012 and an expanded version appeared in ACM Transactions on Computer Systems in 2013. Spanner shards data across many sets of replicas spread over data centers worldwide, and uses Paxos to keep those replicas in agreement.
Spanner’s central contribution is that it supports general-purpose distributed transactions and SQL-like queries while still guaranteeing external consistency: if one transaction commits before another starts, the system assigns the first an earlier timestamp. This is a strong property that earlier large-scale systems gave up in exchange for availability.
The mechanism that makes this possible is the TrueTime API, which exposes clock time not as a single instant but as an interval with bounded uncertainty, backed by GPS receivers and atomic clocks in each data center. By waiting out that uncertainty before committing, Spanner can assign globally meaningful commit timestamps without coordinating clocks message-by-message.
Spanner builds on earlier Google infrastructure, including the Bigtable storage model and the Chubby lock service for coordination, and demonstrated that a system could combine the scale of a NoSQL store with the transactional guarantees of a traditional relational database.