根据Cap定理的CA分布式系统如何存在 [英] How CA distributed system according to Cap Theorem can exist

查看:269
本文介绍了根据Cap定理的CA分布式系统如何存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

分布式系统如何保持一致和可用-CA.因为当分区发生时,CA是不可能的.如果我们说不会发生分区,那么只有它们是CA,那么如果分区不会发生,那么所有CP或AP系统也将是CA?

解决方案

稍后回答,抱歉:

不能.

正如经常提到的那样,原始形式的CAP定理有点误导.可以重述为

在存在网络分区的情况下,分布式系统可用或一致

所以你是对的.通常,不能将系统仅分类为CA,CP或AP,因为分区容限是系统的属性,它描述了在进行网络分区时应选择的内容.因此,系统有时可能会根据AP行为,而有时可能会根据CP行为(但并不常见).

另一个有趣的部分是RDBMS数据库通常位于三角形的CA端.仅在单节点设置中是这种情况.即使使用主(写)-从(读)设置,系统也不是CA(或者如果是CA,则可能会出现分支裂情况,​​为分区选择新的主,等等.)./p>

有用的读物​​: https://codahale.com/you-cant-sacrifice-分区容限/.

How can a distributed system be consistent and available - CA. Because when partition happens CA is not possible. And if we say partition wont happen then only they are CA, then all systems which are CP or AP will also be CA in case partition wont happen?

解决方案

A little late answer, sorry:

It can't.

As often mentioned, the CAP theorem in its original form is a little misleading. It can be restated as

in the presence of the network partition, a distributed system is either available or consistent

so you are right. Generally systems cannot be classified as CA, CP or AP only, since partition tolerance is a property of the system, which describes what to choose in case of a network partition. So it is possible that a system can behave according to AP sometimes, and CP other times (however it is not common).

Another interesting part is that RDBMS databases are often at the CA side of the triangle. This is only the case in a single node setup. Even with master (write) - slave (read) setup, the system is not CA (or if it is CA, then a split-bran scenario may happen, a new master is elected for the partition, etc...).

Useful read: https://codahale.com/you-cant-sacrifice-partition-tolerance/.

这篇关于根据Cap定理的CA分布式系统如何存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆