如果我们对一个 C+A 分布式系统进行分区呢?
What if we partition a C+A distributed system?
我读过this, this and this,但仍然无法理解CAP定理的C+A范畴。
我的意思是那些系统的设计不支持可能发生的分区。如果周围有副本,他们最终可以处理一些孤立节点的丢失。
是的,但我可以看到其中一些确实存在。那么,在现实世界中,如果我们对节点进行分区,它们会如何表现?两个分区中的活动节点必须在 A 和 C 之间进行选择...或者它们都丢失了?
你不可能拥有 C+A 分布式系统,这就是 CAP 定理的全部要点。例如,正如所解释的 here,我引用:
CAP prohibits only a tiny part of the design space: perfect availability and consistency in the presence of partitions, which are rare.
Although designers still need to choose between consistency and availability when partitions are present, there is an incredible range of flexibility for handling partitions and recovering from them.
如果您想将 CAP 定理简化为一个短句(例如“您可以从 3 个中选出 2 个”),更好的近似是:
In the presence of a partition, you get to pick consistency or availability.
我读过this, this and this,但仍然无法理解CAP定理的C+A范畴。
我的意思是那些系统的设计不支持可能发生的分区。如果周围有副本,他们最终可以处理一些孤立节点的丢失。
是的,但我可以看到其中一些确实存在。那么,在现实世界中,如果我们对节点进行分区,它们会如何表现?两个分区中的活动节点必须在 A 和 C 之间进行选择...或者它们都丢失了?
你不可能拥有 C+A 分布式系统,这就是 CAP 定理的全部要点。例如,正如所解释的 here,我引用:
CAP prohibits only a tiny part of the design space: perfect availability and consistency in the presence of partitions, which are rare.
Although designers still need to choose between consistency and availability when partitions are present, there is an incredible range of flexibility for handling partitions and recovering from them.
如果您想将 CAP 定理简化为一个短句(例如“您可以从 3 个中选出 2 个”),更好的近似是:
In the presence of a partition, you get to pick consistency or availability.