Evaluation of Spanner
Understand how Google Spanner achieves strong external consistency with its TrueTime API and linearizable timestamps. Learn about its scalable architecture separating compute and storage, synchronous replication via Paxos, and fault tolerance with multi-region data. This lesson helps you grasp how Spanner delivers global performance, supports large-scale transactions with serializable isolation, and maintains high availability in distributed systems.
We'll cover the following...
Consistency
Spanner provides external consistency (the strongest kind of consistency) via the TrueTime API. Regardless of whatever replica performs the read, a strong read in Spanner will always see the results of all transactions committed before the operation began. Spanner relies on TrueTime to generate timestamps from a decentralized, virtual version of the world clock.
When a transaction is committed in Spanner, a timestamp is added to it from a trusted source, TrueTime. This ensures that the commit sequence of transactions can be linearized. There is a strict order to execute all transactions to maintain external consistency.
Whenever a client observes a transaction T2 beginning to commit after a previous transaction T1 has completed, the system will give T2 a timestamp that is later than T1's. With TrueTime, clients produce timestamps that increase monotonically. Let’s say an app executes two transactions,