Understanding Cloud Spanner
What makes Cloud Spanner remarkable is its ability to seemingly overcome the limitations of other relational databases without making the trade-offs generally associated with NoSQL databases. Cloud Spanner is globally consistent, highly available, horizontally scalable, and fully ACID compliant. Let's take a closer look at how Cloud Spanner actually achieves this.
Cloud Spanner and CAP theorem
As many readers are likely familiar with, the CAP theorem plays a significant role when designing distributed systems. Introduced by Eric Brewer in 1998, the CAP theorem states that any distributed system can guarantee at most two of the following three qualities:
- Consistency: All observers see the most recent data and order of events is guaranteed
- Availability: The system is always online and able to handle all requests
- Partition tolerance: The system continues to operate during network disruptions
Traditional relational databases guarantee consistency and partition tolerance...