You Can’t Sacrifice Partition Tolerance
http://codahale.com/you-cant-sacrifice-partition-tolerance/
On Partition Tolerance
- In order to model partition tolerance, 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. (And any pattern of message loss can be modeled as a temporary partition separating the communicating nodes at the exact instant the message is lost.)
- For a distributed (i.e., multi-node) system to not require partition-tolerance it would have to run on a network which is guaranteed to never drop messages (or even deliver them late) and whose nodes are guaranteed to never die. You and I do not work with these types of systems because they don’t exist.
But Never Both
- You cannot, however, choose both consistency and availability in a distributed system.
- As a thought experiment, imagine a distributed system which keeps track of a single piece of data using three nodes—A, B, and C—and which claims to be both consistent and available in the face of network partitions. Misfortune strikes, and that system is partitioned into two components: {A,B} and {C}. In this state, a write request arrives at node C to update the single piece of data. That node only has two options:
- Accept the write, knowing that neither A nor B will know about this new data until the partition heals.
- Refuse the write, knowing that the client might not be able to contact A or B until the partition heals.
- You either choose availability (Door #1) or you choose consistency (Door #2). You cannot choose both.
- To claim to do so is claiming either that the system operates on a single node (and is therefore not distributed) or that an update applied to a node in one component of a network partition will also be applied to another node in a different partition component magically. 如果同时满足CA的话,就意味着需要牺牲P(或者是在网络断开的情况下面能够magically达成一致,当然这是不可能的)。而不允许parition tolerance的话似乎只有单机系统而非分布式系统。