当前位置:网站首页>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 and numpy, tensor and array conversion
- 牛客网刷题(一)
- Baidu cloud web speed playback (is there any website available)
- 复制延迟案例(3)-单调读
- T - sne + data visualization parts of the network parameters
- 自动化测试—web自动化—selenium初识
- 单细胞测序流程(单细胞rna测序)
- After the form is submitted, the page does not jump [easy to understand]
- 多主复制下处理写冲突(1)-同步与异步冲突检测及避免冲突
- LevelSequence源码分析
猜你喜欢
【pytorch】pytorch 自动求导、 Tensor 与 Autograd
自动化测试—web自动化—selenium初识
【Meetup预告】OpenMLDB+OneFlow:链接特征工程到模型训练,加速机器学习模型开发
苹果官网样式调整 结账时产品图片“巨大化”
Intelligent bin (9) - vibration sensor (raspberries pie pico implementation)
上传图片-微信小程序(那些年的坑记录2022.4)
【C语言】LeetCode27.移除元素
深度学习机器学习理论及应用实战-必备知识点整理分享
The new BMW 3 Series is on the market, with safety and comfort
tooltips使用教程(鼠标悬停时显示提示)
随机推荐
MySQL multi-table union query
牛客 HJ20 密码验证合格程序
Unity 之 图集属性详解和代码示例 -- 拓展一键自动打包图集工具
单细胞测序流程(单细胞rna测序)
【网络通信三】研华网关Modbus服务设置
复制延迟案例(3)-单调读
tensorflow2.0 cnn(layerwise)
【Yugong Series】July 2022 Go Teaching Course 022-Dictionary of Go Containers
牛客 HJ18 识别有效的IP地址和掩码并进行分类统计
苹果官网样式调整 结账时产品图片“巨大化”
npm安装时卡在sill idealTree buildDeps,npm安装速度慢,npm安装卡在一个地方不动
牛客 HJ3 明明的随机数
Baidu cloud web speed playback (is there any website available)
自动化测试—web自动化—selenium初识
LeetCode_733_Image rendering
i.MX6ULL driver development | 33 - NXP original network device driver reading (LAN8720 PHY)
关于柱状图的经典画法总结
【pytorch】1.7 pytorch与numpy,tensor与array的转换
研发过程中的文档管理与工具
How C programs run 01 - the composition of ordinary executable files