架构师训练营第 6 周作业
CAP定理
In a distributed system(a collection of interconnected nodes that share data.), you can only two out of the following three guarantees across a write/read pair: Consistency, Availability, and Partition Tolerance - one of them must be sacrificed.
简单翻译为:在一个分布式系统(指互相连接并共享数据的节点的集合)中,当设计读写操作时,只能保证一致性(Consistence)、可用性(Availablity)、分区容错性(Partition Tolerance)三者中的两个,另外一个必需被牺牲。
一致性:对某个指定的客户端来说,读操作能够保证返回最新的写结果
A read is guaranteed to return the most recent write for a given client.
可用性:非故障的节点在合理的时间内返回合理的响应(不是错误和超时的响应)
A non-failing node will return a reasonable response within a reasonable amount of time(no error or timeout)
分区容忍性:当出现网络分区后,系统能够继续“履行职责”
The system will continue to function when network partitions occur.
评论