PACELC Theorem

PACELC Theorem Definition

The PACELC theorem is an extension to the CAP theorem. Both theorems were developed to provide a framework for comparing distributed systems. Like the CAP theorem, the PACELC theorem states that in case of network partitioning (P) in a distributed computer system, one has to choose between availability (A) and consistency (C). PACELC extends the CAP theorem by introducing latency and consistency as additional attributes of distributed systems. The theorem states that, “else (E), even when the system is running normally in the absence of partitions, one has to choose between latency (L) and consistency (C).”

CAP theorem was originally formulated by a noted computer scientist, Eric Brewer. The theorem states that it is impossible for a distributed system to provide more than two of the following three guarantees:

  • Consistency – the same response is given to all identical requests
  • Availability – access continues even during a partial system failure
  • Partition Tolerance – operations remain intact even when some nodes are unavailable.

PACELC was developed to address a key limitation of the CAP theorem: it makes no provision for performance or latency. For example, according to the CAP theorem, a database can be considered Available if a query returns a response after 30 days. Obviously, such latency would be unacceptable for any real-world application.

Martin Kleppmann has written a comprehensive critique of the CAP Theorem in which he states, “CAP is often interpreted as proof that eventually consistent databases have better availability properties than strongly consistent databases; although there is some truth in this, we show that more careful reasoning is required.” So, it is important to keep in mind that the CAP theorem is a simplified model for understanding a very complex topic. PACELC is one attempt to address this limitation of the CAP Theorem.

As a newer way to model databases, the PACELC theorem extends the CAP theorem model, showing that systems can either tend towards latency sensitivity or strong consistency. In this way, a NoSQL system like ScyllaDB will be defined as PA/EL(highly available and latency sensitive) while a NewSQL system such as Google Spanner is defined as PC/EC( focusing primarily on being strongly consistent).

[Learn about PACELC vs CAP theorem, straight from the inventor of PACELC, Dr. Daniel Abadi]

Image showing the relationship between Partition, Availability, Consistency, Letency, and Consistency or PACELC.

PACELC Theorem FAQs

How Does the PACELC Theorem Apply to NoSQL Databases?

Under the CAP Theorem, NoSQL databases are generally considered to be AP systems, providing Availability and Partition tolerance at the expense of Consistency. Compared to the CAP Theorem, PACELC provides a better and more nuanced framework for comparing NoSQL databases.

For example, NewSQL databases such as Google Spanner and its offspring, CockroachDB, provide Consistency, Availability and Partition tolerance. According to Eric Brewer’s painstaking analysis, Google Spanner is technically a CP system that can claim to be an “effectively CA” system.

Compared to ScyllaDB, Google Spanner, under normal circumstances with no partition failures, favors consistency over latency. ScyllaDB, in contrast, favors latency over consistency under normal operating conditions.

How Does ScyllaDB Behave According to the PACELC Theorem?

The PACELC theorem provides a better framework for understanding ScyllaDB than the CAP Theorem. Under the CAP Theorem, ScyllaDB is considered to be an AP system; however, this designation does not provide the added nuance provided by PACELC. Under the PACELC Theorem, ScyllaDB is considered to be a PA/EL system.

In terms of the PACELC Theorem, ScyllaDB can be defined as PA/EL: partition tolerant, highly available, and oriented towards low latency as opposed to consistency. ScyllaDB has been designed to be highly available, but also to provide consistent low-latencies. ScyllaDB does provide tunable consistency. But, under the PACELC formulation, it favors low latency over consistency while also providing extreme high availability. Short of a complete systemic outage, ScyllaDB should remain up and available for mission critical applications.

Understanding ScyllaDB as PA/ELhelps developers and architects understand how ScyllaDB maps into use cases. ScyllaDB is designed to provide high availability and predictable low latencies for extremely high volumes of data for globally distributed database clusters. When comparing ScyllaDB with other databases for such use cases, PACELC helps teams to identify similar databases (that is, other AP/EL databases), and then to compare them side-by-side using industry standard performance benchmarks, such as the Yahoo Cloud Serving Benchmark (YCSB).

Trending NoSQL Resources

ScyllaDB University Mascot

ScyllaDB University

Get started on your path to becoming a ScyllaDB expert.