The CAP theorem can be phrased as "PAC", the impossibility theorem that no distributed data store can be both consistent and available in executions that contains partitions. This can be proved by examining latency: if a system ensures consistency, then operation latencies grow with message delays, and hence operations cannot terminate eventually if the network is partitioned, i.e. the system cannot ensure availability.1
In the absence of partitions, both consistency and availability can be satisfied.2 PACELC therefore goes further and examines how the system replicates data. Specifically, in the absence of partitions, an additional trade-off (ELC) exists between latency and consistency.3 If the store is atomically consistent, then the sum of the read and write delay is at least the message delay. In practice, most systems rely on explicit acknowledgments rather than timed delays to ensure delivery, requiring a full network round trip and therefore message delay on both reads and writes to ensure consistency.4 In low latency systems, in contrast, consistency is relaxed in order to reduce latency.5
There are four configurations or tradeoffs in the PACELC space:
PC/EC and PA/EL provide natural cognitive models for an application developer. A PC/EC system provides a firm guarantee of atomic consistency, as in ACID, while PA/EL provides high availability and low latency with a more complex consistency model. In contrast, PA/EC and PC/EL systems only make conditional guarantees of consistency. The developer still has to write code to handle the cases where the guarantee is not upheld. PA/EC systems are rare outside of the in-memory data grid industry, where systems are localized to geographic regions and the latency vs. consistency tradeoff is not significant.6 PC/EL is even more tricky to understand. PC does not indicate that the system is fully consistent; rather it indicates that the system does not reduce consistency beyond the baseline consistency level when a network partition occurs—instead, it reduces availability.7
Some experts like Marc Brooker argue that the CAP theorem is particularly relevant in intermittently connected environments, such as those related to the Internet of Things (IoT) and mobile applications. In these contexts, devices may become partitioned due to challenging physical conditions, such as power outages or when entering confined spaces like elevators. For distributed systems, such as cloud applications, it is more appropriate to use the PACELC theorem, which is more comprehensive and considers trade-offs such as latency and consistency even in the absence of network partitions.8
The PACELC theorem was first described by Daniel Abadi from Yale University in 2010 in a blog post,9 which he later clarified in a paper in 2012.10 The purpose of PACELC is to address his thesis that "Ignoring the consistency/latency trade-off of replicated systems is a major oversight [in CAP], as it is present at all times during system operation, whereas CAP is only relevant in the arguably rare case of a network partition." The PACELC theorem was proved formally in 2018 in a SIGACT News article.11
12 Original database PACELC ratings are from.13 Subsequent updates contributed by wikipedia community.
Golab, Wojciech (2018). "Proving PACELC". ACM SIGACT News. 49 (1): 73–81. doi:10.1145/3197406.3197420. S2CID 3989621. https://dl.acm.org/doi/10.1145/3197406.3197420 ↩
Abadi, Daniel J. (2010-04-23). "DBMS Musings: Problems with CAP, and Yahoo's little known NoSQL system". Retrieved 2016-09-11. https://dbmsmusings.blogspot.com/2010/04/problems-with-cap-and-yahoos-little.html ↩
Abadi, Daniel J. "Consistency Tradeoffs in Modern Distributed Database System Design" (PDF). Yale University. http://www.cs.umd.edu/~abadi/papers/abadi-pacelc.pdf ↩
Abadi, Daniel (15 July 2019). "The dangers of conditional consistency guarantees". DBMS Musings. Retrieved 29 August 2024. https://dbmsmusings.blogspot.com/2019/07/the-dangers-of-conditional-consistency.html ↩
Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems. O'Reilly Media. ISBN 978-1449373320. 978-1449373320 ↩
Abadi, Daniel J.; Murdopo, Arinto (2012-04-17). "Consistency Tradeoffs in Modern Distributed Database System Design". Retrieved 2022-07-18. https://www.slideshare.net/arinto/consistency-tradeoffinmoderndb ↩
"Global tables - multi-Region replication for DynamoDB". AWS Documentation. Retrieved 4 January 2023. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html ↩
Abadi, Daniel (2017-10-08). "DBMS Musings: Hazelcast and the Mythical PA/EC System". DBMS Musings. Retrieved 2017-10-20. https://dbmsmusings.blogspot.com/2017/10/hazelcast-and-mythical-paec-system.html ↩
"Hazelcast IMDG Reference Manual". docs.hazelcast.org. Retrieved 2020-09-17. https://docs.hazelcast.org/docs/4.0.2/manual/html-single/index.html#cp-subsystem ↩
Porter, Kevin (29 March 2023). "Where does aerospike fall in PACELC?". Aerospike Community Forum. Retrieved 30 March 2023. https://discuss.aerospike.com/t/where-does-aerospike-fall-in-pacelc/10111/2 ↩
Dynamo, Cassandra, and Riak have user-adjustable settings to control the LC tradeoff.[6] ↩
Cosmos DB has five selectable consistency levels to control the LC tradeoff.[11] ↩
Abadi, Daniel (2018-09-21). "DBMS Musings: NewSQL database systems are failing to guarantee consistency, and I blame Spanner". DBMS Musings. Retrieved 2019-02-23. https://dbmsmusings.blogspot.com/2018/09/newsql-database-systems-are-failing-to.html ↩
Zelinskie, Jimmy (2024-04-23). "SpiceDB Concepts: Consistency". SpiceDB documentation. Retrieved 2024-05-02. https://authzed.com/docs/spicedb/concepts/consistency ↩