BASE-compliant data

BASE-compliant data essentially throws those concepts out the window and starts with a clean slate. It relies on the findings of the CAP Theorem, also known as Brewer's Theorem, which states that there are three stem requirements that modern, highly distributed, scalable applications will strive to deliver: Consistency, Availability, and Partition Tolerance. The crux of the research is that only two of those can ever be delivered simultaneously if we want the system to operate in real time.

For example, if we want the system to be fully consistent at all times, this can only be done by sacrificing availability or partition tolerance. A single-partition system is fully consistent and available at all times but there is no tolerance of failure. A multi-partition system can be designed to be consistent, but to achieve consistency all partitions need to be synchronized at the same time, meaning the system will be unavailable during the consistency window. We can make this system partition-tolerant and available, but it will never be fully consistent due to this same fact.

So, BASE-compliant databases were introduced as a way to acknowledge what the CAP theorem tells us about distributed systems. If you want to scale your relational ACID database beyond a certain number of nodes, you will have to sacrifice one of the features of the CAP theorem and then your database will not be ACID compliant anymore. That is why most modern NoSQL solutions opt for unlimited scalability across multiple nodes, which delivers partition tolerance and high inherent availability over consistency.

In NoSQL databases, we talk about eventual consistency as a way to describe what is happening in the backend: data is written to one node and then replicated over to others. While the data is being replicated, the system is available and will still serve either old or new data, making the data inconsistent during a replication window. This is an underlying reality of distributed systems that cannot be overcome, and we essentially need to embrace it in our application design and run with it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset