当前位置:网站首页>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.
边栏推荐
猜你喜欢
【pytorch】1.7 pytorch与numpy,tensor与array的转换
最新神作!阿里巴巴刚出炉的面试参考指南(泰山版),我直接狂刷29天
【7.29】Code Source - 【Arrangement】【Stone Game II】【Cow and Snacks】【Minimum Number of Spawns】【Sequence】
gerrit中如何切换远程服务器
Intelligent bin (9) - vibration sensor (raspberries pie pico implementation)
C language - function
[pytorch] pytorch automatic derivation, Tensor and Autograd
阿里三面:MQ 消息丢失、重复、积压问题,如何解决?
t-sne 数据可视化网络中的部分参数+
tooltips使用教程(鼠标悬停时显示提示)
随机推荐
牛客 HJ16 购物单
Handling write conflicts under multi-master replication (4) - multi-master replication topology
深度学习机器学习理论及应用实战-必备知识点整理分享
How to install CV2 smoothly in Anaconda
MySQL multi-table union query
Applicable Scenarios of Multi-Master Replication (1) - Multi-IDC
动态规划(一)
GP 6 overall architecture study notes
【luogu P8326】Fliper(图论)(构造)(欧拉回路)
2020微信小程序反编译教程(小程序反编译源码能用吗)
小程序:matlab解微分方程「建议收藏」
自动化测试—web自动化—selenium初识
ansible学习笔记02
tensorflow2.0 cnn(layerwise)
Small program: Matlab solves differential equations "recommended collection"
第05章 存储引擎【1.MySQL架构篇】【MySQL高级】
Stuck in sill idealTree buildDeps during npm installation, npm installation is slow, npm installation is stuck in one place
动态规划之线性dp(下)
How Redis handles concurrent access
百度网盘网页版加速播放(有可用的网站吗)