当前位置:网站首页>The CAP theorem instance analysis
The CAP theorem instance analysis
2022-08-08 05:30:00 【etcEriksen】
An example analysis of the CAP theorem:
Let's talk about the conclusion first: the CAP theorem says that we can only satisfy two of consistency, availability and partition tolerance.Among them, partition fault tolerance must be satisfied, so we have to make a choice between consistency and availability.
(1) The banking system is a server cluster with multiple servers to improve performance
(2) At first, Xiaoye stored 50 million in the banking system. At this moment, a server was offline and online due to network turbulence.At this time, data synchronization is performed again.
(3) A question arises: in the process of synchronizing data, is the entire banking system allowed to provide external access?
If it is allowed, then we default to availability, but it is possible that the data is not synchronized and the consistency is not fully established.Therefore, it can only satisfy the partition fault tolerance and availability.
If it is not allowed, then we will default to consistency, just to ensure that the data is opened to the outside world after the synchronization is completed, so the availability cannot be taken into account.Therefore, only partition fault tolerance and consistency can be satisfied.
Consistency pursued by ZooKeeper:
ZooKeeper does not pursue strong consistency when synchronizing data, but sequential consistency (monotonically increasing transaction id)
边栏推荐
猜你喜欢

wpf中DataGrid的样式

Use of Filter

Efficient and beautiful scrolling component Slivers of Flutter tutorial (tutorial includes source code)

温故知新—Activity的五种启动模式

121道分布式面试题和答案

轮播文字! QPainter

基本工具-NETCAT(telnet-banner、传输文本信息)

Web 攻击的日志分析:初学者指南

Filter 过滤器的使用

Distributed Transactions: A Reliable Message Eventual Consistency Scheme
随机推荐
Flatten multidimensional array to one dimension
如何批量导入文件,并全部自定义重命名为相同文件名
Database sub-database sub-table, when?How to divide?
查询时间内用户分布的sql语句
基本工具-NETCAT(telnet-banner、传输文本信息)
Entering the world of audio and video - RGB and YUV formats
Week 8 Generative Adversarial Networks(生成对抗网络 GAN)
Week 9 10 Neural Networks
10 must-have free tools for self-media people to operate quickly and efficiently
Redis设置开机自启动
顺序表(下)
clue binary tree
The only OpenCyphal/UAVCAN tutorial in the whole network (11) Write a Cyphal protocol parsing tool with candump and gawk tools
数据库分库分表,何时分?怎样分?
[Redis] Redis Learning - Transaction
Week 8 Transformer Language Models and Implications
关于如何做选择
MySQL4(多表查询)
Personal Summary of OLTP and OLAP Issues
Week 8 Transformer Language Models and Implications