当前位置:网站首页>CAP定理
CAP定理
2022-04-23 15:37:00 【dengk2013】
一致性C代表更新操作成功后,所有节点在同一时间的数据完全一致。强一致性必然导致效率低下,打个比方,如果招商银行的钱转账到浦发银行中,双方一定要确定收到扣减都是成功才返回给客户端,转账后界面会让我们等待5S,这5S时间就是双方系统在确认。
可用性A代表用户访问数据时,系统是否能在正常响应时间返回预期的结果,比如订单系统下单成功后,要通过rpc调用库存系统扣减库存,此时扣减库存的操作比较复杂,耗时比较场,为了让用户有更好的体验,我们就异步返回一个成功的ack,之后让用户来查,保证了用户很好的体验。
分区容错性P代表分布式系统在遇到某节点或网络分区故障的时候,仍然能够对外提供满足一致性或可用性的服务。比如我们常用的微服务多集群部署就是分区容错性,也就是一个节点宕机后,其他的节点可用。
AP表现为订单创建后不等待库存减少直接返回处理结果
CP表现为订单创建后一直等待库存减少后才返回结果
AC表现为不再拆分数据系统,在一个数据库的一个事务中完成操作,也就是单体应用
版权声明
本文为[dengk2013]所创,转载请带上原文链接,感谢
https://blog.csdn.net/u012222011/article/details/124337364
边栏推荐
- [backtrader source code analysis 18] Yahoo Py code comments and analysis (boring, interested in the code, you can refer to)
- 网站某个按钮样式爬取片段
- 字符串最后一个单词的长度
- Squid agent
- Mysql database explanation (8)
- Advantages, disadvantages and selection of activation function
- 基于 TiDB 的 Apache APISIX 高可用配置中心的最佳实践
- PHP operators
- cadence SPB17. 4 - Active Class and Subclass
- Mysql database explanation (10)
猜你喜欢
随机推荐
Common interview questions of operating system:
Recommended search common evaluation indicators
My raspberry PI zero 2W toss notes to record some problems and solutions
控制结构(一)
移动金融(自用)
MySQL Basics
调度系统使用注意事项
HJ31 单词倒排
[backtrader source code analysis 18] Yahoo Py code comments and analysis (boring, interested in the code, you can refer to)
Mysql database explanation (VII)
删除字符串中出现次数最少的字符
Collation of errors encountered in the use of redis shake
Detailed explanation of kubernetes (XI) -- label and label selector
Use of common pod controller of kubernetes
c语言---字符串+内存函数
Explanation of redis database (III) redis data type
Educational codeforces round 127 A-E problem solution
Educational Codeforces Round 127 A-E题解
服务器中毒了怎么办?服务器怎么防止病毒入侵?
YML references other variables