CAP定理是否意味着ACID对于分布式数据库来说是不可能的?[英] Does the CAP theorem imply that ACID is not possible for distributed databases?

本文是小编为大家收集整理的关于CAP定理是否意味着ACID对于分布式数据库来说是不可能的?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

nosql酸(分布式)数据库尽管CAP定理.这是怎么可能的? CAP定理与(可能/无法)酸是什么关系?

是不可能的,分布式计算机系统可以同时提供一致性, 可用性和分区耐受性.

推荐答案

CAP定理实际上有些误导.您可以拥有CA设计的事实是胡说八道,因为当一个分区发生时,您一定会在一致性(例如数据同步问题)或可用性(延迟)方面存在问题.这就是为什么有一个更准确的定理说明:

在分布式系统中的A 分区期间,您必须在一致性和 availapial 中选择.

.

在实践中仍然不是那么简单.您应该注意,一致性和可用性之间的选择不是二进制的.您甚至可以两者都有一定程度的程度.例如,关于酸,您可以与NOSQL进行原子和耐用的交易,但放弃了一定程度的隔离和一致性,以获得更好的可用性.然后可以将可用性吸收到延迟中,因为您的响应时间将取决于几个因素(最近的服务器可用吗?).

.

因此,要回答您的问题,这通常是营销胡说八道.您需要实际刮擦表面,以查看解决方案的准确和没收.

如果您想要更深入的解释,可以查看 a>, or " http://www.bailis.org/blog/when-is-acid-acid-rarely/"> here .

其他推荐答案

paceLc定理延长了上限即使在Partitions ernaftions aren aren aents aren aren aents aren aents arents arents arents aren发生.分布式系统的令人兴奋的见解之一是,当使用筏或paxos之类的共识协议来创建事务日志时,可以将它们耐受地分配而不会失去一致性. calvin协议将筏日志与确定性交易应用程序结合在一起.

faunadb 即使在分区或复制失败期间,只要不划分复制品,就可以在分区或复制失败期间进行严格的序列化.

本文地址:https://www.itbaoku.cn/post/597626.html

问题描述

There are NoSQL ACID (distributed) databases, despite CAP theorem. How this is possible? What's the relation between CAP theorem and (possible/not possible of) being ACID?

Is impossible for a distributed computer system to simultaneously provide consistency, availability and partition tolerance.

推荐答案

CAP theorem is actually a bit misleading. The fact you can have a CA design is nonsense because when a partition occurs you necessarily have a problem regarding consistency (data synchronization issue for example) or availability (latency). That's why there is a more accurate theorem stating that :

During a partition in a distributed system, you must chose between consistency and availability.

Still in practice it is not that simple. You should note that the choice between consistency and availability isn't binary. You can even have some degree of both. For example regarding ACID, you can have atomic and durable transactions with NoSQL, but forfeit a degree of isolation and consistency for better availability. Availability can then be assimilated to latency because your response time will depend on several factors (is the nearest server available ?).

So, to answer your question, this is usually marketing bullshit. You need to actually scratch the surface to see what the solution is exactly gaining and forfeiting.

If you want deeper explanations you can look here, here or here.

其他推荐答案

The PACELC theorem extends CAP to talk about the tradeoffs even when partitions aren't happening. One of the exciting insights for distributed systems, is that they can be made partition tolerant without losing consistency, when consensus protocols such as RAFT or Paxos are used to create a transaction log. The Calvin protocol combines a RAFT log with deterministic transaction application.

FaunaDB implements Calvin, allowing it to maintain ACID transactions with strict-serializability, even during partitions or during replica failure, as long as a quorum of replicas is not partitioned.