当前位置:网站首页>Masterless replication system (2) - read and write quorum
Masterless replication system (2) - read and write quorum
2022-07-31 16:39:00 【HUAWEI CLOUD】
图-10中,If there are more than two of the three copies, the processing will be completed,Write to consider success.If only one of the three copies completes the write,会怎样?After several copies are completed, the write can be considered successful?
A successful write operation requires at least two of the three replicas to complete,That is, at most one copy may contain the old value.因此,When reading, a read request must be initiated to at least two replicas,The version number determines that at least one must contain the new value.If the third replica is down or slow to respond,The read can still continue and return the latest value.
若有n副本,write mustw个节点确认,At least for every read queryr个节点.只要 w + r > n,We expect to get the latest value on read,因为rAt least one node of the reads is up-to-date.遵循这些r值,wThe reading and writing of values is called a quorum(quorum)读和写.也可认为r和wis a judgment read、写是否有效的最低票数.
Dynamostyle database,参数n,w和r一般可配置.A common choice isn为奇数(3或5)并设置 (向上取整).But the numbers can be changed as needed.例如,设置和Workloads with few writes and high reads may benefit.This makes reading faster,But it has the disadvantage that only one failed node causes all database writes to fail.
There may be more than n的节点.(A cluster may have more machines than replicas),But any given value can only be stored in n个节点上.This allows partitioning of the dataset,This enables data sets larger than the storage capacity of a single node to be supported.
仲裁条件Defines the number of failed nodes that the system can tolerate:
- 如果,如果节点不可用,We can still handle writes.
- 如果,如果节点不可用,We can still handle reads.
- 对于,We can tolerate an unavailable node.
- 对于,We can tolerate two unavailable nodes. This case is for example图5-11所示.
- 通常,Read and write operations are always sent to all in paralleln个副本. 参数w和rDecide how many nodes we wait for,i.e. before we consider the read or write to be successful,How many nodes need to report success.

If less than requiredw或r节点可用,then writing or reading will return an error. 节点不可用原因:Due to an error in performing the operation(Unable to write because the disk is full),because the node is down(崩溃,关闭电源),Due to network outages between client and server nodes, etc. Only care if the node returns a successful response,There is no need to distinguish the specific cause of the error.
边栏推荐
- 最后写入胜利(丢弃并发写入)
- How C programs run 01 - the composition of ordinary executable files
- Anaconda如何顺利安装CV2
- 无主复制系统(3)-Quorum一致性的局限性
- 基于C语言的编译器设计与实现
- 牛客 HJ3 明明的随机数
- 你辛辛苦苦写的文章可能不是你的原创
- 【7.29】Code Source - 【Arrangement】【Stone Game II】【Cow and Snacks】【Minimum Number of Spawns】【Sequence】
- 【Meetup预告】OpenMLDB+OneFlow:链接特征工程到模型训练,加速机器学习模型开发
- 2022年整理LeetCode最新刷题攻略分享(附中文详细题解)
猜你喜欢
随机推荐
Implementing DDD based on ABP
无主复制系统(1)-节点故障时写DB
动态规划(一)
.NET 20th Anniversary Interview - Zhang Shanyou: How .NET technology empowers and changes the world
Replication Latency Case (1) - Eventual Consistency
js的toString方法
How to switch remote server in gerrit
关于柱状图的经典画法总结
2022年整理LeetCode最新刷题攻略分享(附中文详细题解)
Flutter set the background color of the statusbar status bar and APP method (AppBar) internal consistent color.
你辛辛苦苦写的文章可能不是你的原创
adb shell error error: device unauthorized
动态规划之线性dp(下)
.NET 20周年专访 - 张善友:.NET 技术是如何赋能并改变世界的
[TypeScript]OOP
Stuck in sill idealTree buildDeps during npm installation, npm installation is slow, npm installation is stuck in one place
Graham‘s Scan法求解凸包问题
6-22漏洞利用-postgresql数据库密码破解
Premiere Pro 2022 for (pr 2022)v22.5.0
Design and Implementation of Compiler Based on C Language


![[pytorch] pytorch automatic derivation, Tensor and Autograd](/img/99/c9632a7d3f70a13e1e26b9aa67b8b9.png)





![[pytorch] 1.7 pytorch and numpy, tensor and array conversion](/img/ca/b943ff8f59f08e9e23b1ba416c79a0.png)
