1. 首页
  2. 大数据
  3. 算法与数据结构
  4. Spanner TrueTime & the CAP Theorem.pdf

Spanner TrueTime & the CAP Theorem.pdf

上传者: 2021-04-17 16:27:33上传 PDF文件 167.55KB 热度 8次
Spanner is Google’s highly available global SQL database [CDE+12]. It manages replicated data at great scale, both in terms of size of data and volume of transactions. It assigns globally consistent real-time timestamps to every datum written to it, and clients can do globally consistent reads across the entire database without locking. The CAP theorem [Bre12] says that you can only have two of the three desirable properties of: • C: Consistency, which we can think of as serializability for this discussion; • A: 100% availability, for both reads and updates; • P: tolerance to network partitions. This leads to three kinds of systems: CA, CP and AP, based on what letter you leave out. Note that you are not entitled to 2 of 3, and many systems have zero or one of the properties. For distributed systems over a “wide area”, it is generally viewed that partitions are inevitable, although not necessarily common [BK14]. Once you believe that partitions are inevitable, any distributed system must be prepared to forfeit either consistency (AP) or availability (CP), which is not a choice anyone wants to make. In fact, the original point of the CAP theorem was to get designers to take this tradeoff seriously. But there are two important caveats: first, you only need forfeit something during an actual partition, and even then there are many mitigations (see the “12 years” paper [Bre12]). Second, the actual theorem is about 100% availability, while the interesting discussion here is about the tradeoffs involved for realistic high availability.
下载地址
用户评论