架构师训练营第 06 周—— 练习
请简述 CAP 原理。
In a distributed system (a collection of interconnected nodes that share data.), you can only have two out of the following three guarantees across a write/read pair: Consistency, Availability, and Partition Tolerance - one of them must be sacrificed.
https://robertgreiner.com/cap-theorem-revisited/
一致性(Consistency):A read is guaranteed to return the most recent write for a given client.
可用性(Availability):A non-failing node will return a reasonable response within a reasonable amount of time (no error or timeout).
分区容忍性(Partition Tolerance):The system will continue to function when network partitions occur.
虽然 CAP 理论定义是三个要素中只能取两个,但放到分布式环境下来思考,我们会发现必须选择 P(分区容忍)要素,因为网络本身无法做到 100% 可靠,有可能出故障,所以分区是一个必然的现象。
评论 (1 条评论)