Skip to main content

Posts

Showing posts from July, 2023

Does Google Spanner Provide High Availability and Strong Consistency, Defying CAP Theorem

 I was going through one of the official introduction videos of Google Spanner. It mentions " Google Spanner is a mission-critical relational database service built from the ground up and battle-tested at Google for Strong Consistency and High Availability at a global scale ". A few questions popped up into my mind after this statement: How does a database guarantee high Availability and Strong Consistency on a global scale? Ensuring Partition Tolerance is necessary in building Distributed Systems. On top of that, how does Spanner provide High Availability and Strong Consistency simultaneously? If it provides all three guarantees, does this break the CAP theorem? The short answer is Google Spanner does not break the CAP theorem . Before going deep, let us revisit the CAP theorem. As per Wikipedia, any distributed data store can provide two of the following three guarantees: Consistency - Every read receives the most recent write or an error . Each read operation returns ...