Cassandra中Paxos和W+R>=N的区别是什么? [英] Whats the difference between Paxos and W+R>=N in Cassandra?

查看:20
本文介绍了Cassandra中Paxos和W+R>=N的区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

类 Dynamo 数据库(例如 Cassandra)可以通过仲裁来强制一致性,即应该以 W+R 的方式选择多个同步写入的副本 (W) 和多个要读取的副本 (R)>N 其中 N 是复制因子.另一方面,Zookeeper 等基于 PAXOS 的系统也被用作一致的容错存储.

Dynamo-like databases (e.g. Cassandra) can enforce consistency by means of quorum, i.e. a number of synchronously written replicas (W) and a number of replicas to read (R) should be chosen in such a way that W+R>N where N is a replication factor. On the other hand, PAXOS-based systems like Zookeeper are also used as a consistent fault-tolerant storage.

这两种方法有什么区别?PAXOS 是否提供 W+R>N 模式未提供的保证?

What is the difference between these two approaches? Does PAXOS provide guarantees that are not provided by W+R>N schema?

推荐答案

Paxos 实施起来并不简单,而且成本很高,以至于许多使用它的系统也使用提示,或者仅将其用于领导者选举,或其他.但是,它确实在出现故障时提供了有保证的一致性——当然受其特定故障模型的限制.

Paxos is non-trivial to implement, and expensive enough that many systems using it use hints as well, or use it only for leader election, or something. However, it does provide guaranteed consistency in the presence of failures - subject of course to the limits of its particular failure model.

我看到的第一个基于仲裁的系统假设了某种领导者或事务基础设施,以确保足够的一致性,您可以相信仲裁机制是有效的.这个基础设施很可能是基于 Paxos 的.

The first quorum based systems I saw assumed some sort of leader or transaction infrastructure that would ensure enough consistency that you could trust that the quorum mechanism worked. This infrastructure might well be Paxos-based.

查看诸如https://cloudant.com/blog/dynamo-和-couchdb-clusters/,看起来Dynamo 不是基于保证其仲裁系统一致性的基础设施——那么它是非常聪明还是偷工减料?根据 http://muratbuffalo.blogspot.co.uk/2010/11/dynamo-amazons-highly-available-key.html,Dynamo系统在牺牲一致性的程度上强调可用性.摘要内容为Dynamo在某些故障情况下牺牲一致性".实际上,后来很明显,即使没有故障,Dynamo 也会牺牲一致性:在存在多个并发写入请求的情况下,Dynamo 可能会变得不一致,因为副本可能会因多个协调器而发散."(结束语)

Looking at descriptions such as https://cloudant.com/blog/dynamo-and-couchdb-clusters/, it would appear that Dynamo is not based on an infrastructure that guarantees consistency for its quorum system - so is it being very clever or cutting corners? According to http://muratbuffalo.blogspot.co.uk/2010/11/dynamo-amazons-highly-available-key.html, "The Dynamo system emphasizes availability to the extent of sacrificing consistency. The abstract reads "Dynamo sacrifices consistency under certain failure scenarios". Actually, later it becomes clear that Dynamo sacrifices consistency even in the absence of failures: Dynamo may become inconsistent in the presence of multiple concurrent write requests since the replicas may diverge due to multiple coordinators." (end quote)

因此,在 Dynamo 中实现的仲裁的情况下,Paxos 似乎提供了更强的可靠性保证.

So, it would appear that in the case of quorums as implemented in Dynamo, Paxos provides stronger reliability guarantees.

这篇关于Cassandra中Paxos和W+R>=N的区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆