Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于分布式中CAP的反思 #38

Open
guodongxiaren opened this issue Apr 18, 2020 · 0 comments
Open

关于分布式中CAP的反思 #38

guodongxiaren opened this issue Apr 18, 2020 · 0 comments

Comments

@guodongxiaren
Copy link
Owner

很久之前就听说过CAP,知道其表达到是三者无法同时满足。

C 一致性
A 可用性
P 分区容错性

后来读了DDIA,发现自己之前的很多理解还是浮于表面,没有深入骨髓。思考如下:

CAP作为经验提出,并无准确的定义。
CAP只是历史上有重大影响力的一个说法而已,对于具体系统设计的价值有待商榷。
CAP范围很窄:

  • 一致性只考虑了线性化的一致性这一种。
  • 故障也只考虑了网络分区(节点断连但各自活跃)没有考虑网络延迟、节点失败或其他折中的情况。

三者不能同时满足。这个说法有误导,其实准确的说法是:一旦发生网络故障(分区),必须要在C和A之间选择一个!因为网络分区P不是特性,是故障,无所谓喜欢与不喜欢。而C和A则可以权衡!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant