当前位置:网站首页>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)
边栏推荐
- Leetcode sword 】 refers to the Offer (special commando) summary
- 邮件钓鱼上线cobalstrike
- Single host docker builds redis-cluster
- 查询时间内用户分布的sql语句
- MySQL中CHAR_LENGTH()和LENGTH()的区别
- 日常bug小结:
- The only OpenCyphal/UAVCAN tutorial in the whole network (11) Write a Cyphal protocol parsing tool with candump and gawk tools
- Database sub-database sub-table, when?How to divide?
- bpftrace:简便输出调试信息
- 数据库系统原理与应用教程(080)—— MySQL 练习题:操作题 186-193(二十四):综合练习
猜你喜欢

The only OpenCyphal/UAVCAN tutorial in the whole network (11) Write a Cyphal protocol parsing tool with candump and gawk tools

Sqlmap + dnslog injection of repetition

Preprocessing Notes

10 must-have free tools for self-media people to operate quickly and efficiently

【着色器实现Tricolor三原色型变效果_Shader效果第十八篇】

仿QQ好友列表,QListWidget!

分类、目标检测、语义分割、实例分割的区别

Leetcode78. 子集

数据库分库分表,何时分?怎样分?

《动机与人格》笔记(一)——人类似乎从来就没有长久地感到过心满意足
随机推荐
查询跟踪多家快递单号,筛选某一时间发货的单号
14. Unity2D horizontal version particle system special effects: blood particles + high landing particles + object pool to manage all particles
Talk about the principle and implementation of Redis distributed lock [Ant Financial Services Three Sides]
Query and track multiple express tracking numbers, and filter the tracking numbers shipped at a certain time
postman---postman参数化
Entering the world of audio and video - RGB and YUV formats
【OAuth2】十八、OIDC的认识应用
让你的应用完美适配平板
cs软件ui构建办法
断言失败——[UITableView _configureCellForDisplay: forIndexPath:]
Error: [Intervention] Unable to preventDefault inside passive event listener due to target ...
wpf中DataGrid的样式
说说Redis分布式锁的原理和实现蚂【蚁金服三面】
Flutter 教程之高效且精美的滚动组件Slivers (教程含源码)
【matlab】matlab中变量赋值函数deal
Mail online cobalstrike fishing
sqlmap+dnslog注入复现
spark入门学习-3-SparkSQL数据抽象
浅学软件逆向笔记(1)
【leetcode】剑指 Offer(专项突击版)汇总