当前位置:网站首页>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.
边栏推荐
- Dialogue with Zhuang Biaowei: The first lesson of open source
- 【7.28】代码源 - 【Fence Painting】【合适数对(数据加强版)】
- 基于Redis(SETNX)实现分布式锁,案例:解决高并发下的订单超卖,秒杀
- 软件实现AT命令操作过程
- 苹果官网样式调整 结账时产品图片“巨大化”
- C language - function
- LeetCode_733_图像渲染
- .NET 20th Anniversary Interview - Zhang Shanyou: How .NET technology empowers and changes the world
- 使用 Postman 工具高效管理和测试 SAP ABAP OData 服务的试读版
- Three aspects of Ali: How to solve the problem of MQ message loss, duplication and backlog?
猜你喜欢

Graham's Scan method for solving convex hull problems

.NET 20th Anniversary Interview - Zhang Shanyou: How .NET technology empowers and changes the world

研发过程中的文档管理与工具

C语言-函数

EF Core 2.2中将ORM框架生成的SQL语句输出到控制台

Intelligent bin (9) - vibration sensor (raspberries pie pico implementation)

【7.29】Code Source - 【Arrangement】【Stone Game II】【Cow and Snacks】【Minimum Number of Spawns】【Sequence】

AcWing 1282. 搜索关键词 题解((AC自动机)Trie+KMP)+bfs)

Qt practical cases (54) - using transparency QPixmap design pictures

自动化测试—web自动化—selenium初识
随机推荐
i.MX6ULL driver development | 33 - NXP original network device driver reading (LAN8720 PHY)
SHELL内外置命令
[Source code analysis] BeanFactory and FactoryBean
第05章 存储引擎【1.MySQL架构篇】【MySQL高级】
Three aspects of Ali: How to solve the problem of MQ message loss, duplication and backlog?
网站漏洞修复服务商关于越权漏洞分析
Flutter 获取状态栏statusbar的高度
C语言-函数
[TypeScript]OOP
adb shell 报错error: device unauthorized
tensorflow2.0 cnn(layerwise)
Huawei's top engineers lasted nine years "anecdotal stories network protocol" PDF document summary, is too strong
Qt实战案例(54)——利用QPixmap设计图片透明度
【愚公系列】2022年07月 Go教学课程 020-Go容器之数组
SringMVC中个常见的几个问题
[pytorch] pytorch automatic derivation, Tensor and Autograd
How to install CV2 smoothly in Anaconda
牛客网刷题(二)
动态规划(一)
flutter设置statusbar状态栏的背景颜色和 APP(AppBar)内部颜色一致方法。