当前位置:网站首页>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.
边栏推荐
- Flutter 获取状态栏statusbar的高度
- Foreign media right, apple on May be true in inventory
- 单细胞测序流程(单细胞rna测序)
- js的toString方法
- jeecg master-slave database read-write separation configuration "recommended collection"
- How C programs run 01 - the composition of ordinary executable files
- C language - function
- adb shell error error: device unauthorized
- 2022年必读的12本机器学习书籍推荐
- 字符串反转的实现方法总结「建议收藏」
猜你喜欢

智能垃圾桶(八)——红外对管传感器(树莓派pico)

GP 6总体架构学习笔记

动态规划之线性dp(上)

Golang 小数操作之判断几位小数点与四舍五入

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

2022年必读的12本机器学习书籍推荐

Huawei's top engineers lasted nine years "anecdotal stories network protocol" PDF document summary, is too strong

利用PHP开发具有注册、登陆、文件上传、发布动态功能的网站

研发过程中的文档管理与工具
![[TypeScript] In-depth study of TypeScript type operations](/img/d9/ee240ccba72e8d3114ee5c52ed0c8f.png)
[TypeScript] In-depth study of TypeScript type operations
随机推荐
Summary of the implementation method of string inversion "recommended collection"
无主复制系统(1)-节点故障时写DB
How to install CV2 smoothly in Anaconda
Golang 必知必会Go Mod命令
2022年整理LeetCode最新刷题攻略分享(附中文详细题解)
单细胞测序流程(单细胞rna测序)
多数据中心操作和检测并发写入
Baidu cloud web speed playback (is there any website available)
苹果官网样式调整 结账时产品图片“巨大化”
多主复制的适用场景(2)-需离线操作的客户端和协作编辑
TypeError: unhashable type: ‘list‘
selenium的常见方法及使用
Golang go-redis cluster模式下不断创建新连接,效率下降问题解决
Applicable scenario of multi-master replication (2) - client and collaborative editing that require offline operation
【7.29】代码源 - 【排列】【石子游戏 II】【Cow and Snacks】【最小生成数】【数列】
多主复制的适用场景(1)-多IDC
Qt实战案例(54)——利用QPixmap设计图片透明度
[pytorch] 1.7 pytorch and numpy, tensor and array conversion
How C programs run 01 - the composition of ordinary executable files
IP协议从0到1