# CAP theorem

Published articles for CAP theorem.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## The 20 Software Engineering Laws

DevFeed: [The 20 Software Engineering Laws](<https://devfeed.tech/articles/the-20-software-engineering-laws-38691.md>)

Original publisher: [Read original article](<https://newsletter.techworld-with-milan.com/p/the-20-software-engineering-laws>)

Author: Dr Milan Milanović

Published: 2026-04-23T15:01:23Z

Content type: article

Language: en

Sources: [Tech World With Milan Newsletter](<https://devfeed.tech/sources/tech-world-with-milan-newsletter.md>)

Topics: [Software](<https://devfeed.tech/topics/software.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Development](<https://devfeed.tech/topics/development.md>), [engineering-culture](<https://devfeed.tech/topics/engineering-culture.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>)

Tags: [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [conway-s-law](<https://devfeed.tech/tags/conway-s-law.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [software](<https://devfeed.tech/tags/software.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>)

### AI overview

A field guide to twenty software engineering laws, including Gall's Law, KISS, Conway's Law, Hyrum's Law, the CAP Theorem, Brooks's Law, and others. The article explains how these principles describe recurring behavior in software projects, systems, and teams.

### Source excerpt

A field guide to why software projects fail, systems rot, and teams slow down.

## Choosing Consistency Guarantees for Distributed-System Workflows

DevFeed: [Choosing Consistency Guarantees for Distributed-System Workflows](<https://devfeed.tech/articles/consistency-is-negotiable-but-the-bill-always-lands-somewhere-17951.md>)

Original publisher: [Read original article](<https://newsletter.systemdesignclassroom.com/p/consistency-is-negotiable-but>)

Author: Raul Junco

Published: 2026-04-18T11:37:30Z

Content type: article

Language: en

Sources: [System Design Classroom](<https://devfeed.tech/sources/system-design-classroom.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [data](<https://devfeed.tech/topics/data.md>), [Latency](<https://devfeed.tech/topics/latency.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [data](<https://devfeed.tech/tags/data.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [latency](<https://devfeed.tech/tags/latency.md>)

### AI overview

The article explains that consistency guarantees in distributed systems involve trade-offs among correctness, latency, availability, coordination, and operational complexity. It uses banking ledgers and social-media counters to illustrate why different workflows need different guarantees, and discusses CAP theorem and PACELC trade-offs.

### Source excerpt

Linearizable, causal, eventual, and quorum: how to pick the right consistency guarantee for each workflow in your system.

## Understanding Accuracy and Consistency in Distributed Systems

DevFeed: [Understanding Accuracy and Consistency in Distributed Systems](<https://devfeed.tech/articles/cap-questions-almost-never-appear-labeled-as-cap-theorem-17952.md>)

Original publisher: [Read original article](<https://newsletter.systemdesignclassroom.com/p/consistency-vs-accuracy-distributed-systems>)

Author: Raul Junco

Published: 2026-03-07T12:53:30Z

Content type: tutorial

Language: en

Sources: [System Design Classroom](<https://devfeed.tech/sources/system-design-classroom.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Replication](<https://devfeed.tech/topics/replication.md>), [systems](<https://devfeed.tech/topics/systems.md>)

Tags: [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [replication](<https://devfeed.tech/tags/replication.md>), [systems](<https://devfeed.tech/tags/systems.md>)

### AI overview

This tutorial explains how accuracy and consistency differ in distributed systems. It defines accuracy as data reflecting the real-world value and discusses consistency, including linearizability in the CAP theorem, showing how replication delays can cause replicas to temporarily return different values.

### Source excerpt

They show up disguised as simple data questions.

## 25 key terms for speaking Distributed Systems and Temporal

DevFeed: [25 key terms for speaking Distributed Systems and Temporal](<https://devfeed.tech/articles/25-key-terms-for-speaking-distributed-systems-and-temporal-35694.md>)

Original publisher: [Read original article](<https://temporal.io/blog/25-key-terms-for-speaking-distributed-systems-and-temporal>)

Author: Emily Fortuna

Published: 2023-06-29T16:00:00Z

Content type: tutorial

Language: en

Sources: [Temporal Blog](<https://devfeed.tech/sources/temporal-blog.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [reliability](<https://devfeed.tech/topics/reliability.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [reliability](<https://devfeed.tech/tags/reliability.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [systems](<https://devfeed.tech/tags/systems.md>), [temporal-concepts](<https://devfeed.tech/tags/temporal-concepts.md>)

### AI overview

A quick-reference guide explains core distributed-systems terms, including concurrency, scalability, reliability, consistency models, the CAP theorem, availability, partition tolerance, and ACID. It is intended to help readers understand and discuss distributed systems and Temporal.

### Source excerpt

Learn the minimum set of terms to understand and discuss distributed systems challenges and Temporal with all your friends, in plain English.

## You Do It Too: Forfeiting Network Partition Tolerance in Distributed Systems

DevFeed: [You Do It Too: Forfeiting Network Partition Tolerance in Distributed Systems](<https://devfeed.tech/articles/you-do-it-too-forfeiting-network-partition-tolerance-in-distributed-systems-21694.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/07/Forfeit-Partition-Tolerance-Distributed-System-CAP-Theorem.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-07-06T17:25:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Availability](<https://devfeed.tech/topics/availability.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [protocol](<https://devfeed.tech/tags/protocol.md>)

### AI overview

This article examines the CA category in the CAP theorem, arguing that systems can forfeit network partition tolerance and that doing so may sometimes be appropriate. It reviews the category's academic history, the overlap between CA and CP, and the need for recovery mechanisms when partitions occur.

### Source excerpt

"64-node clusters ought to be enough for anybody." Bill Gates, quoted from memory. This post is part of the CAP theorem series. You may want to start by my post on ACID vs. CAP if you have a database background but have never really been exposed to the CAP theorem. The post discussing some traps in the 'Availability' and 'Consistency' definition of CAP could also be used as an introduction if you know CAP but haven't looked at its formal definition. The CA--consistent, available, but not network partition tolerant--category in CAP has a very specific history. Not only forfeiting "network partition tolerance" can be understood as impossible in theory and crazy in practice (P as an illusion of a choice), but there is also an overlap between the CA and CP categories. As a result, many consider that it's impossible to build a production CA system. But you can actually build a system without network partition tolerance, and sometimes you should. A brief history of the CA category Let's look at the academic history of the CA category in CAP: In 2000, Eric Brewer presents the CAP conjecture. In his presentation, CA exists, for example for systems using the two-phase commit protocol. He considers that "‹the whole space is useful." In 2002, Seth Gilbert and Nancy Lynch publish the CAP proof. CA exists: "Systems that run on intranets and LANs are an example of these types of algorithms." In 2010, Daniel Abadi raises the point that there is an overlap between CA and CP: "What does 'not tolerant' mean? In practice, it means that they lose availability if there is a partition. Hence CP and CA are essentially identical." Still in 2010, Michael Stonebraker publishes multiple documents around the limited importance of partitions, with the tagline "Myth #6: In CAP, choose AP over CA", considering that with the capacity of modern hardware, small distributed systems can solve most real-life issues, and that "it doesn't much matter what you do when confronted with network partitions."

## If CAP were real-time: adding timing requirements to the definition of availability

DevFeed: [If CAP were real-time: adding timing requirements to the definition of availability](<https://devfeed.tech/articles/if-cap-were-real-time-adding-timing-requirements-to-the-definition-of-availability-21693.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/06/real-time-CAP-theorem.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-06-14T18:20:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [Availability](<https://devfeed.tech/topics/availability.md>), [Networks](<https://devfeed.tech/topics/networks.md>), [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>), [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [tcp](<https://devfeed.tech/tags/tcp.md>)

### AI overview

This article explains why delays are often misunderstood when applying the CAP theorem. It distinguishes the asynchronous network model used in the CAP proof from TCP and argues that adding timing requirements to CAP can make the model applicable to delays as well as partitions.

### Source excerpt

"If you are not too long, I will wait here for you all my socketReadTimeout." - Oscar Wilde, quoted from memory. This post is part of the CAP theorem series. You may want to start by my post on ACID vs. CAP if you have a database background but have never really been exposed to the CAP theorem. The post discussing some traps in the 'Availability' and 'Consistency' definition of CAP could also be used as an introduction if you know CAP but haven't looked at its formal definition. Delays are a hot source of confusion when using CAP. Confusion arises out of the understanding of what an asynchronous network--the network model used in the CAP proof--actually is. Confusion arises out of what TCP is exactly. Confusion arises out of the definition of availability in CAP--which does not have any timing requirement. In this post, I'm not only going to cover why speaking about delays when the network is asynchronous is a mistake or why TCP is more than an asynchronous network: I will also show that adding timing requirements to CAP makes it usable not only for partitions but also for delays. Why are there never any delays in academic networks? The CAP proof by Gilbert and Lynch uses an "asynchronous model, in which system components take steps at arbitrary speeds." The key point is that there can be no delay, because there is absolutely no timing guarantee, so a message is never late. That's by design, as stated by Lynch: "algorithms designed for the asynchronous model are general and portable, in that they are guaranteed to run correctly in networks with arbitrary timing behavior." On such a network model, you cannot build an application that needs a guaranteed response time. You cannot even provide an approximation of its expected response time. You can at best prove that the application will answer... someday. You can calculate the number of messages required by a given protocol, but you cannot, in any case, calculate a response time. Such a network is never sufficient to wri

## CAP: if all you have is a timeout, everything looks like a partition

DevFeed: [CAP: if all you have is a timeout, everything looks like a partition](<https://devfeed.tech/articles/cap-if-all-you-have-is-a-timeout-everything-looks-like-a-partition-21690.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/05/CAP-theorem-partition-timeout-zookeeper.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-05-25T17:42:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [Network](<https://devfeed.tech/topics/network.md>), [Hadoop](<https://devfeed.tech/topics/hadoop.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Database](<https://devfeed.tech/topics/database.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [apache](<https://devfeed.tech/tags/apache.md>), [apache-zookeeper](<https://devfeed.tech/tags/apache-zookeeper.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [hadoop](<https://devfeed.tech/tags/hadoop.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [process](<https://devfeed.tech/tags/process.md>), [synchronization](<https://devfeed.tech/tags/synchronization.md>), [timeout](<https://devfeed.tech/tags/timeout.md>)

### AI overview

This article distinguishes network partitions from node failures and process crashes in the CAP theorem. It examines how Apache HBase uses Apache ZooKeeper ephemeral nodes and session timeouts for failure detection, noting that timeout-based recovery affects mean time to repair across these failure scenarios.

### Source excerpt

"I suppose it is tempting, if the only tool you have is a timeout, to treat everything as if it were a partition." - Abraham Maslow, quoted from memory This post is part of the CAP theorem series. You may want to start by my post on ACID vs. CAP if you have a database background but have never really been exposed to the CAP theorem. The post discussing some traps in the 'Availability' and 'Consistency' definition of CAP should also be used as an introduction if you know CAP but haven't looked at its formal definition. Partitions in the CAP theorem are network partitions, and nothing else. There're not node failure or process crash. But does this matter in real-life? Let's answer this question by looking at an optimisation implemented on Apache HBase and Apache ZooKeeper when handling process crash. This is applicable by anyone using ZooKeeper. Apache HBase, ZooKeeper and failure detection Using ZooKeeper website: "ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications." And HBase website: "Apache HBase™ is the Hadoop database, a distributed, scalable, big data store." HBase is an open source implementation of Google's Bigtable. Cluster size varies from 5 to x000 nodes. ZooKeeper is used by HBase for a few things, one of them being, like in Bigtable, detecting failures. ZooKeeper manages failures by giving the user the possibility to create "ephemeral nodes". "These znodes exist as long as the session that created the znode is active. When the session ends the znode is deleted." And then "Expirations happen when the cluster does not hear from the client within the specified session timeout period (i.e. no heartbeat). At session expiration the cluster will delete any/all ephemeral nodes owned by that session and immediately notify any/all connected clients of the change (anyone w

## Eventual Consistency and Durability

DevFeed: [Eventual Consistency and Durability](<https://devfeed.tech/articles/eventual-consistency-and-durability-21691.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/05/definition-eventual-consistency-durability.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-05-12T15:51:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [NoSQL](<https://devfeed.tech/topics/nosql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [nosql](<https://devfeed.tech/tags/nosql.md>), [nosql-databases](<https://devfeed.tech/tags/nosql-databases.md>), [partition](<https://devfeed.tech/tags/partition.md>), [storage](<https://devfeed.tech/tags/storage.md>)

### AI overview

The article explains eventual consistency in NoSQL databases and distinguishes it from ACID consistency. It discusses durability, defines eventual consistency using cited formulations, and introduces a replicated key-value database model using N, W, and R parameters.

### Source excerpt

"A son can bear with equanimity the loss of his father, but the loss of his data may drive him to despair." (Machiavelli, quoted from memory) While traditional databases are ACID, with the 'D' meaning Durability, the NoSQL databases are mainly described by their memory model, i.e. Strong Consistency vs. Eventual Consistency. We're going to see that durability is not something you can forget about so easily. Definition of Eventually Consistent Eventual Consistency was defined by Werner Vogels in [E2] "the storage system guarantees that if no new updates are made to the object, eventually all accesses will return the last updated value." It's one definition among many. Baillis and Ghodsi mention for example [E3] "Informally, it guarantees that, if no additional updates are made to a given data item, all reads to that item will eventually return the same value." This definition only says that the value will converge to something (say '42'). In 1995, Terry used [V5] "All servers move towards eventual consistency. That is, the Bayou system guarantees that all servers eventually receive all Writes.". As most implementations available today are inspired by the Dynamo paper and Vogels' works, it's safer to stick to Vogels' definition, who knew them all, and has chosen his words carefully. In the CAP series, I explained the importance of this definition. And finally, this consistency is not the same thing as the consistency in ACID. Using an eventually consistent database So if we have an eventually consistent key-value database, we can implement a client that would be doing something like this for example: ecStorage.put("anId", "someData"); while (ecStorage.get("anId") == null) sleep 1 second; We know that this program will finish: even if the first "gets" may not see our write, eventually they will see it. Eventually Consistent database - possible implementation The most usual implementation is the one described once again by Werner Vogels, once again in his [E2] paper: N

## The Consistency Series

DevFeed: [The Consistency Series](<https://devfeed.tech/articles/the-consistency-series-21692.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/05/the-consistency-series.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-05-12T15:43:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [consistency](<https://devfeed.tech/topics/consistency.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [acid](<https://devfeed.tech/topics/acid.md>), [Dynamo](<https://devfeed.tech/topics/dynamo.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [dynamo](<https://devfeed.tech/tags/dynamo.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [series](<https://devfeed.tech/tags/series.md>)

### AI overview

The article introduces a new series on consistency models, focusing on practical details and their implementations. It distinguishes the topic from a simple strong-versus-eventual consistency trade-off and previews posts about durability, ACID, and the Dynamo model.

### Source excerpt

"Those are my consistency models, and if you don't like them... well, I have others." - Groucho Marx, quoted from memory The CAP theorem series is coming to an end. I have a few posts planned, but they will be mainly about wrapping things-up-- I hope these posts will be great, though. Anyway, here starts a new series: the consistency series. This series is about getting into some practical details about the consistency models and their implementations. You think that the trade-off is only or mainly on strong consistency vs. eventual consistency? That everything is said with "W+R" vs. "N"? Then read this series. Settling on the color may not be enough when choosing a car. Posts, in recommended reading order The posts published so far are: Eventual Consistency and Durability: shows the link between durability and consistency, and why traditional databases have the 'D' in ACID. Tells you what 'W=1' implies in the Dynamo model.

## CAP, Availability, High-Availability and Big Data databases in a world of partitions

DevFeed: [CAP, Availability, High-Availability and Big Data databases in a world of partitions](<https://devfeed.tech/articles/cap-availability-high-availability-and-big-data-databases-in-a-world-of-partitions-21688.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/04/cap-availability-high-availability-and_16.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-04-16T16:32:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [big-data](<https://devfeed.tech/topics/big-data.md>), [Availability](<https://devfeed.tech/topics/availability.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [big-data](<https://devfeed.tech/tags/big-data.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [high-availability](<https://devfeed.tech/tags/high-availability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>)

### AI overview

This article uses the CAP theorem to categorize distributed systems and extends the discussion to big-data systems, where data does not fit on a single node. It distinguishes CAP consistency from ACID consistency, defines CAP availability, and proposes a comparable definition of high availability.

### Source excerpt

"Those who would give up Consistency, to purchase a little temporary Availability, deserve neither Consistency nor Availability." (B. Franklin, quoted from memory) This post is part of the CAP theorem series. You may want to start by my post on ACID vs. CAP if you have a database background but have never really been exposed to the CAP theorem. The post discussing some traps in the 'Availability' and 'Consistency' definition of CAP should also be used as an introduction if you know CAP but haven't looked at its formal definition. This post, as was the previous one, is about using CAP to categorize distributed systems. It summarizes its results and extends them to "big data" distributed systems. Compared to other distributed systems, "big data" systems add another dimension: by definition, the data does not fit into a single node. As we will see, this has some implications. Science Fiction authors are often ahead of their time. Will this be the case here? Looking at the terminology - CAP theorem & Availability Here we will use the definitions from the proof of the CAP theorem by Gilbert and Lynch [C2]. Consistent is [C2]: "Atomic, linearizable, consistency [...]. There must exist a total order on all operations such that each operation looks as if it were completed at a single instant. This is equivalent to requiring requests of the distributed shared memory to act as if they were executing on a single node, responding to operations one at a time." We have seen that CAP consistency is different from ACID consistency. Partition is [C2]: "The network will be allowed to lose arbitrarily many messages sent from one node to another. When a network is partitioned, all messages sent from nodes in one component of the partition to nodes in another component are lost." We have seen that node failures and packet losses are not partitions. Available is [C2]: "For a distributed system to be continuously available, every request received by a non-failing node in the system must r

## The unclear CP vs. CA case in CAP

DevFeed: [The unclear CP vs. CA case in CAP](<https://devfeed.tech/articles/the-unclear-cp-vs-ca-case-in-cap-21689.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/04/the-unclear-cp-vs-ca-case-in-cap.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-04-05T16:53:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

This post examines why the CAP theorem's AP, CP, and CA categories can be unclear and may say little about how a distributed system actually behaves. It uses several example architectures, including SQL databases, eventually consistent stores, multiple databases with two-phase commit, and distributed consensus servers, while distinguishing CAP terminology from ACID terminology.

### Source excerpt

This post is part of the CAP theorem series. You may want to start by my post on ACID vs. CAP if you have a database background but have never really been exposed to the CAP theorem. The post discussing some traps in the 'Availability' and 'Consistency' definition of CAP should also be used as an introduction if you know CAP but haven't looked at its formal definition. CAP is a theorem, but it is also widely used to categorize distributed systems and to explain their trade-offs. It looks great: "Hey, it's based on a theorem! This is scientifically proven!" However, the meaning of these categories--AP, CP, CA--is not that clear, leading to an opposite result: the CAP categorization says very little on how the distributed system actually behaves. For example, look at the CA category--Consistent and Available but not Partition-tolerant. A widely accepted opinion is: "Partition cannot be avoided. Your distributed system can just choose to sacrifice either consistency or availability when a partition occurs. So a distributed system cannot be CA, by definition." Indeed, Eric Brewer himself, wrote in 2012 [C3]: "Does choosing consistency and availability (CA) as the '2 of 3' make sense? As some researchers correctly point out, exactly what it means to forfeit P is unclear." Should one use the CA category then? A slide saying that some systems are CA. Does its author really understand CAP? To answer this question, we're going to use CAP to categorize a few different distributed systems: A simple application using a single server with a traditional SQL database. The same application, but with an Eventually Consistent store instead of our traditional SQL one. An application using multiple databases and the two-phase commit protocol. A distributed consensus server, like Apache ZooKeeper or Google Chubby. Also, as we know, using CAP in a database context can be confusing. In this post, I always use CAP terminology and not ACID terminology. When I say "consistent" or "strongly c

## The confusing CAP and ACID wording

DevFeed: [The confusing CAP and ACID wording](<https://devfeed.tech/articles/the-confusing-cap-and-acid-wording-21687.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/03/the-confusing-cap-and-acid-wording.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-03-26T15:30:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [integrity](<https://devfeed.tech/topics/integrity.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [durability](<https://devfeed.tech/tags/durability.md>), [integrity](<https://devfeed.tech/tags/integrity.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [properties](<https://devfeed.tech/tags/properties.md>), [systems](<https://devfeed.tech/tags/systems.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

This article explains why CAP and ACID use overlapping terms with different meanings in distributed systems and database systems. It compares concepts including consistency, atomicity, transactions, durability, availability, and partition tolerance, highlighting where the terminology overlaps and where the concepts differ.

### Source excerpt

CAP and ACID share a common vocabulary: Atomic, Consistent, and so on. But there is a catch: the words are the same but they mean totally different things. CAP comes from the distributed systems theory, while ACID belongs to database systems one.The Distributed Databases use both CAP and ACID vocabulary, so this obviously creates a lot of confusion. When someone says: "one should not give up consistency" what's the consistency he is speaking about? Let's have a look at the definitions of Atomic-Consistent-Isolated-Durable and Consistent-Available-Partition-tolerant. ACID & CAP - A reminder ACID properties were identified in the 70's, then the term ACID was coined in 1983. We have: A for Atomicity C for Consistency I for for Isolation D for Durability Reminder: the ACID properties were defined in California during the 70's. The CAP theorem was conjectured by Eric Brewer in 2000, and proved in 2002 by Seth Gilbert and Nancy Lynch. We have: C for Consistency A for Availability P for Partition-tolerance. CAP and ACID wording - the confusion summarized First, let's see the global picture. Word Databases CAP Confusion Transaction A set of operations. The word and the concept are not used. No Durable "Once a transaction completes successfully, its changes to the state survive failures." [D2] The word and the concept are not used. No Consistent Integrity constraints on the data (data types, relations, ...) For CAP, Consistency is a shortcut for "Atomic Consistency". The atomic consistency is a consistency model. More on this later. Same word, different concepts Isolation "Even though transactions execute concurrently, it appears to each Transaction, T, that others executed either before either after T". [D2] The word is not used in CAP but the word Isolation as defined in ACID is a consistency model in CAP vocabulary. Different words but same concept Atomic All changes happen or none happen. For CAP, Atomic is a consistency model, the one used in the CAP proof. Same word, dif

## Don't use the CAP theorem for packet losses

DevFeed: [Don't use the CAP theorem for packet losses](<https://devfeed.tech/articles/don-t-use-the-cap-theorem-for-packet-losses-21685.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/03/dont-use-cap-theorem-for-packet-losses.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-03-18T15:16:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [Networks](<https://devfeed.tech/topics/networks.md>), [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [ip](<https://devfeed.tech/tags/ip.md>), [latency](<https://devfeed.tech/tags/latency.md>), [messages](<https://devfeed.tech/tags/messages.md>), [network](<https://devfeed.tech/tags/network.md>), [networks](<https://devfeed.tech/tags/networks.md>), [partition](<https://devfeed.tech/tags/partition.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [theory](<https://devfeed.tech/tags/theory.md>), [udp](<https://devfeed.tech/tags/udp.md>)

### AI overview

The article explains why ordinary packet loss on IP networks should not automatically be treated as a CAP theorem partition. It distinguishes congestion-related packet loss from the arbitrary message loss assumed by the CAP model and discusses how TCP responds to congestion.

### Source excerpt

In the previous post, we looked at this common saying: "nodes fail, network packets get lost, partitions happen so you need to use CAP to understand your trade-offs." We saw that node failures were not partitions. What about packet losses? Most distributed applications use TCP or UDP on top of IP, and it is well known that IP is an asynchronous protocol and that it can lose packets. So should we use all the results from the theory of asynchronous networks? Must we use CAP to do some trade-offs if we are using a network that can drop packets? The answer is no. The root issue lies in the incompleteness of our description of IP. "IP is an asynchronous protocol and it can lose packets" is true, but incomplete, and this incompleteness is misleading. Let's discuss why. CAP - The usual reminder CAP says that a distributed system cannot be Consistent, Available and Partition tolerant. We use here the definitions from the proof [C2]. Consistent is: [C2] "Atomic, linearizable, consistency [...]. There must exist a total order on all operations such that each operation looks as if it were completed at a single instant. This is equivalent to requiring requests of the distributed shared memory to act as if they were executing on a single node, responding to operations one at a time." Available is: [C2] "For a distributed system to be continuously available, every request received by a non-failing node in the system must result in a response." Partition is: [C2] "The network will be allowed to lose arbitrarily many messages sent from one node to another. When a network is partitioned, all messages sent from nodes in one component of the partition to nodes in another component are lost." How can you lose packets on a network Packet loss happens when a network equipment receives more messages that it can send. Losing packets is common on an IP network. A TCP connection tries to use most of the bandwidth available. It sends nearly as many packets as it can, until it loses some. Losi

## CAP Theorem Scope: Why Node Failures Are Not Network Partitions

DevFeed: [CAP Theorem Scope: Why Node Failures Are Not Network Partitions](<https://devfeed.tech/articles/don-t-use-the-cap-theorem-for-node-failures-21684.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/03/dead-nodes-dont-bite.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-03-13T10:22:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [Process](<https://devfeed.tech/topics/process.md>), [data](<https://devfeed.tech/topics/data.md>), [Network](<https://devfeed.tech/topics/network.md>), [Availability](<https://devfeed.tech/topics/availability.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [process](<https://devfeed.tech/tags/process.md>), [request](<https://devfeed.tech/tags/request.md>)

### AI overview

This article examines the scope of the CAP theorem and argues that process crashes and node failures are not network partitions under CAP's definitions. It reviews the theorem's consistency, availability, and partition definitions, then evaluates the common intuition that a failed node is equivalent to a node separated by a partition.

### Source excerpt

"Dead nodes don't bite." - Robert Louis Stevenson (quoted from memory) CAP is often described as a theorem you cannot avoid using. A common saying is "nodes fail, network packets get lost, partitions arise so you need to use CAP to choose the trade-offs." Actually, the CAP scope is not that wide. Let's look at why a process crash or a node failure are not partitions in CAP. CAP - the usual reminder CAP is a theorem, initially conjectured by Eric Brewer and proved in 2002 by Seth Gilbert and Nancy Lynch proved [C2]. Its catchy definition is: "Consistency, Availability, Partition tolerance: pick two." Let's remind the definitions from the proof [C2]. Consistent is: "Atomic, linearizable, consistency [...]. There must exist a total order on all operations such that each operation looks as if it were completed at a single instant. This is equivalent to requiring requests of the distributed shared memory to act as if they were executing on a single node, responding to operations one at a time." Available is: "For a distributed system to be continuously available, every request received by a non-failing node in the system must result in a response." Partition is: "The network will be allowed to lose arbitrarily many messages sent from one node to another. When a network is partitioned, all messages sent from nodes in one component of the partition to nodes in another component are lost." Node failure vs. partition - the wrong intuition A common and wrong intuition is: "from the point of view of the remaining nodes, it is impossible to distinguish a node that has failed from a node that is on another partition: in both cases, it does not respond nor sends any message. As a consequence, there is no difference between a network partition and a node failure." Let's try this intuition: first against the definition of CAP, then against its proof, and then against real-life data store implementations. Is this crocodile dead or is it just sleeping? There is no difference until yo

## Comparing Eventually Consistent and CP-as-in-CAP stores

DevFeed: [Comparing Eventually Consistent and CP-as-in-CAP stores](<https://devfeed.tech/articles/comparing-eventually-consistent-and-cp-as-in-cap-stores-21683.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/03/comparing-eventually-consistent-and-cp-CAP.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-03-11T15:13:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [data](<https://devfeed.tech/topics/data.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [Latency](<https://devfeed.tech/topics/latency.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [storage](<https://devfeed.tech/tags/storage.md>)

### AI overview

This article compares eventual consistency with CP data stores under the CAP theorem. It examines hypothetical key-value-store implementations to show that apparent read-speed advantages can violate the definition of eventual consistency, especially the requirement that all accesses eventually return the latest value.

### Source excerpt

Eventual Consistency (EC) is a well known concept. The CAP theorem, which defines Consistency, Availability and Partition tolerance is also well known. It describes some distributed systems such as CP, which has two properties: Consistency and Partition tolerance. If we look at data stores just by how they stick to the definition of their consistency model and compare their speeds, which one would be the fastest? An EC or a CP store? Answering this question is a good excuse to go into some detail of their respective definitions and show some of their limits. Contrary to popular belief, data stores can be very fast Eventually Consistent Eventually Consistent was defined by Werner Vogels in [E2]: "the storage system guarantees that if no new updates are made to the object, eventually all accesses will return the last updated value." Let's try a few implementations of a hypothetical key value store. Implementation 1: Trying the simplest option void put(key, value){ // do nothing } value get(key){ // Hey, it's easy to implement! We're going // to pretend that we have not yet received // the write, it is enough! throw "no value for this key" } Is this an EC store? No, it is not, because it will never return the last updated value. To be an EC store you need to "eventually [...] return the last updated value." That's not what this implementation does, it will never return the last updated value. So let's try another one. Implementation 2: Trying to be fast for reads void put(key, value){ doRealPut(key, value) // does the 'real' job } value get(key){ if (random(2) == 1) // 50% of the time throw "no value for this key" else return doRealGet(key) // As, 50% of the time, I pretend // that I have not yet received // the first insertion, I // divide the latency by two! } Is this an EC store? Again, it is not because it does not respect the property "eventually all accesses will return the last updated value." The "all accesses" condition is not met. The definition does not prev

## The CAP theorem series

DevFeed: [The CAP theorem series](<https://devfeed.tech/articles/the-cap-theorem-series-21686.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/03/the-cap-theorem-series.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-03-10T15:10:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [big-data](<https://devfeed.tech/topics/big-data.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [big-data](<https://devfeed.tech/tags/big-data.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>)

### AI overview

An introduction to a series examining the CAP theorem and databases. The series addresses commonly misunderstood distinctions involving consistency, availability, partitions, node failures, packet loss, ACID terminology, and distributed-system categories.

### Source excerpt

Let me introduce a new series of posts on the CAP theorem. CAP is a well known theorem conjectured and proven by recognized researchers in distributed systems, namely Eric Brewer, Seth Gilbert and Nancy Lynch. It is also widely used to categorize distributed applications. With CAP, do computer scientists actually have a better classification tool than biologists? Why you want to read this series on CAP theorem and databases This series covers some points often forgotten or misunderstood and sometimes never mentioned, such as: '42' is not a valid answer for an eventually consistent database; Node failures and packet loss are not partitions; Consistent in ACID and Consistent in CAP are two different things; The CAP definition of availability is key but very different from what most people think; There are some systems that do not fit into the three CA/CP/CA categories; It's possible to use the CA category, really possible, There is no such thing as an eventually consistent and available big data database. The posts, in recommended reading order Comparing Eventually Consistent and CP-as-in-CAP stores: Introduces the definitions of "Consistent" and "Available" in the CAP theorem. By comparing them with the definition of "Eventual Consistency" we show the limits of these definitions. The confusing ACID and CAP wording: Explains the terminologies of ACID and CAP, and how they overlap. Covers as well the difference between the theoretical definition of the 'I' in ACID and its actual implementation with multiple "isolation degrees". It's a good starting point if you know the "Consistency" definition of ACID but not the "Consistency" definition of CAP. Don't use the CAP theorem for node failures: Looks at a common misunderstanding of the CAP theorem: node failures are not partitions. It's also a pretext to look at the actual proof of CAP, and to go into the definition of "Partition" in CAP. Don't use the CAP theorem for packet losses: Looks at another common misunderstanding