4 ms·
The most misunderstood theorem of all time.
by senorrib 3y ago
The most misunderstood theorem of all time.
- belter 3y agoPlease be more specific.
- yen223 3y ago(Not the OP) The "C" and "A" in CAP theorem have very specific definitions in the context of the theorem, that isn't the same as, say, the "C" in ACID. The CAP theorem in its original formulation makes no claim about latency, or eventual consistency, or any of these things. It is a very trivial logical conclusion. "Consistency" just means when a node is queried, you either get the latest read, or you get an error. "Availability" just means when a node is queried, you always get something. You never get an error. --- Given this, we can show with a simple example that in the face of a network partition, it is impossible to get C and A simultaneously. Suppose there's a Leader node and a Follower node with the two being kept in sync, but say there's a network partition between the two, so the Follower cannot reach the Leader. Say I changed my name in the Leader from "old-name" to "new-name". If I ask the Follower node what my name is, what should it return? The follower can't know that the update has occurred, so you can see that it can only do one of two things - The follower could return an error (it has C, but not A) - The follower could return "old-name" (it has A, but not C)
- belter 3y agoThanks for the explanation I appreciate it, even if I am familiar with CAP.The answer I was looking for was instead, what is normally misunderstood about it... :-)