当前位置:网站首页>Multi-datacenter operation and detection of concurrent writes
Multi-datacenter operation and detection of concurrent writes
2022-07-31 16:40:00 【HUAWEI CLOUD】
Multi-Data Center Operations
Masterless replication is also suitable for multi-datacenter operations, as it is designed to better tolerate concurrent write conflicts, network outages, and latency spikes.
Cassandra supports cross-datacenter operation in its masterless model in its default configuration: the number of replicas n includes nodes in all datacenters, and in the configuration, you can specify the number of replicas you want to have in each datacenter.Every write from a client is sent to all replicas regardless of the data center, but clients typically only wait for acknowledgments from quorum nodes within their local data center, thus being immune to cross-data center link delays and outages.High-latency writes to other data centers are typically configured to occur asynchronously, although there is some flexibility in configuration [50, 51].
Riak keeps all communication between clients and database nodes local to a data center, so n describes the number of replicas within a data center.Cross-datacenter replication between database clusters happens asynchronously in the background in a style similar to multi-leader replication.
Detect concurrent writes
Dynamo-style DB allows multiple clients to concurrently write to the same K, which may conflict even with strict quorum mechanisms.Similar to multi-master replication, but in DynamoDB, concurrent write conflicts may also occur during read repair or data fetching.
Due to unstable network latency or local failure, requests may arrive in different orders at different nodes.Figure-12 shows that two clients A and B initiate a write request to the primary key X at the same time:
- Node 1 received the write from A, but did not receive the write from B due to node failure
- Node 2 first receives A's write, then B's write
- Node 3 receives B's write first, then A's write
If the node simply overwrites the original K whenever it receives a new write request, the node will be permanently inconsistent, as shown in Figure-12, node 2 considers the final value of X as B, while other nodes consider the value as A.
Replicas should converge to the same value for eventual consensus to be reached.One might hope for automatic handling between replicas, but unfortunately, most implementations are rubbish, and if you don't want to lose data, you have to know a lot about the mechanism of conflict handling within the DB.
边栏推荐
- 阿里三面:MQ 消息丢失、重复、积压问题,如何解决?
- LeetCode_733_图像渲染
- arm按键控制led灯闪烁(嵌入式按键实验报告)
- Handling write conflicts under multi-master replication (4) - multi-master replication topology
- 牛客 HJ17 坐标移动
- Graham‘s Scan法求解凸包问题
- Applicable Scenarios of Multi-Master Replication (1) - Multi-IDC
- form 表单提交后,使页面不跳转[通俗易懂]
- 【愚公系列】2022年07月 Go教学课程 021-Go容器之切片操作
- MySQL multi-table union query
猜你喜欢
selenium的常见方法及使用
宁波大学NBU IT项目管理期末考试知识点整理
Intelligent bin (9) - vibration sensor (raspberries pie pico implementation)
adb shell error error: device unauthorized
Premiere Pro 2022 for (pr 2022)v22.5.0
Golang go-redis cluster模式下不断创建新连接,效率下降问题解决
阿里三面:MQ 消息丢失、重复、积压问题,如何解决?
Implementing distributed locks based on Redis (SETNX), case: Solving oversold orders under high concurrency
Qt实战案例(54)——利用QPixmap设计图片透明度
研发过程中的文档管理与工具
随机推荐
ansible study notes 02
2020微信小程序反编译教程(小程序反编译源码能用吗)
T - sne + data visualization parts of the network parameters
AcWing 1282. 搜索关键词 题解((AC自动机)Trie+KMP)+bfs)
Foreign media right, apple on May be true in inventory
牛客 HJ16 购物单
智能垃圾桶(九)——震动传感器(树莓派pico实现)
JS基础小练习
多主复制下处理写冲突(1)-同步与异步冲突检测及避免冲突
字符指针赋值[通俗易懂]
How to install CV2 smoothly in Anaconda
Anaconda如何顺利安装CV2
【Yugong Series】July 2022 Go Teaching Course 021-Slicing Operation of Go Containers
MySQL常用语句整理
Masterless Replication System (3)-Limitations of Quorum Consistency
【7.28】代码源 - 【Fence Painting】【合适数对(数据加强版)】
牛客网刷题(二)
EF Core 2.2中将ORM框架生成的SQL语句输出到控制台
Replication Latency Case (1) - Eventual Consistency
【pytorch】1.7 pytorch与numpy,tensor与array的转换