Thursday, September 22, 2011

Review: Brewer's CAP Conjecture

In an invited talk, Professor Eric Brewer brought up a conjecture that it is impossible to guarantee all 3 of the following: Consistency, Availability & Partition Tolerance. Consistency is defined as whatever the value of a variable is on one node, the value of that variable must be the same across all of the other nodes. Availability means that every request received by a non-failing node in the system must result in a response while partition tolerance means that the network will be allowed to lose arbitrarily many messages sent from one node to another.

The prove itself is pretty direct. Since there's an arbitrary message loss, if you want to have consistency, then you'll need to sacrifice availability since you need some time before the messages propagate through the nodes to make them consistent. If you want to have availability, then, consistency is sacrificed through a similar reasoning.

I feel that there's no need for a formal proof for this paper because the conjecture is pretty direct. This will definitely impact the programmers whenever they want to design a distributed system. Do they want consistency, in the case of something important like a bank transaction? Or do they want availability, where people don't really care about the accurate result, like the search engine? An important point to be noted is that consistency & availability is not something discrete; It's a whole spectrum, which is why we have terms such as eventual consistency and so on. Thus, the programmers need to think harder about the system that they need to design

No comments:

Post a Comment