Slides to my talk about the new amazing CloudSpanner database service. The talk walks you through the original problem between consistency and availability in distributed database systems and how google solves it.
Cloud Spanner is the only enterprise-grade, globally-distributed, and strongly consistent database service built for the cloud specifically to combine the benefits of relational database structure with non-relational horizontal scale. This combination delivers high-performance transactions and strong consistency across rows, regions, and continents with an industry-leading 99.999% availability SLA, no planned downtime, and enterprise-grade security.
14. But What Is About
Eventual Consistency?
!14
• Consistency model
• Ensure consistency during network partition
• But only eventual!
• Conflict resolution is needed
Most common approach: ‘last write wins’
Is time a good indicator?
15. Clocks
(In Distributed Systems)
!15
Computer Clocks are
not monotone
even network latency
during NTP sync can
be a problem
can be (a little) slower,
faster
leap seconds
never rely on your
computer clock!
18. Cloud Spanner
!18
Fully managed database service at global scale
Traditional relational semantics: schemas, ACID transactions, SQL
Automatic, synchronous replication within and across regions for availability
Googles mission critical scalable relational Database Service
Battle tested within Google for 5plus years (AdWords, Google Play, GCP)
19. Promises
!19
Consistent AND High Available
Technical CP (chooses consistence over availability)
Users can expect global consistent reads across the entire database (CA)
Meets the five 9s in production (HA)
22. How Does Spanner
Achieve That?
!22
Consistency
2-Phase-Commits
Custom Paxos
Strong Consistency!
External Consistency?
23. And The
Atomic Clocks?
!23
TrueTime - highly available, distributed clock
Generate monotonically increasing timestamps
A timestamp is global synchronised with bounded non zero errors
The External Consistency is based on TrueTime
TrueTime is not only about the past
The underlying source of time is a combination of
GPS receivers and atomic clocks