CAP 定理是分布式计算领域的一个基本理论,指出一个分布式系统最多只能同时满足以下三个特性中的两个:一致性(Consistency)、可用性(Availability)和分区容错性(Partition Tolerance)。也被称为 布鲁尔定理(Brewer's Theorem)。
/kæp ˈθɪərəm/
In a distributed database, the CAP theorem forces engineers to make trade-offs between consistency and availability.
在分布式数据库中,CAP 定理迫使工程师在一致性和可用性之间做出权衡。
When a network partition occurs, the CAP theorem tells us that a system must choose either to cancel the operation, sacrificing availability, or to proceed with it, risking inconsistency.
当网络分区发生时,CAP 定理告诉我们,系统必须选择取消操作以牺牲可用性,或者继续操作而承担数据不一致的风险。
CAP 是三个英文单词的首字母缩写:Consistency(一致性)、Availability(可用性)和 Partition Tolerance(分区容错性)。该定理由计算机科学家 Eric Brewer 于 2000 年在 ACM 分布式计算原理研讨会上首次以猜想的形式提出,因此也叫布鲁尔定理。2002 年,Seth Gilbert 和 Nancy Lynch 正式证明了这一猜想。Theorem 一词源自希腊语 theōrēma,意为"观察、命题"。