当前位置:网站首页>Cap principle
Cap principle
2022-07-27 05:48:00 【Captain Planck】
CAP Principles are also called CAP Theorem , In a distributed system , Consistency( Uniformity )、 Availability( Usability )、Partition tolerance( Partition tolerance ), You can't have all three .
Uniformity (C): All data backup in distributed system , Is it the same value at the same time .( Equivalent to all nodes accessing the same copy of the latest data )
Usability (A): After some nodes in the cluster fail , Whether the cluster as a whole can respond to the client's read and write requests .( High availability for data updates )
Zone tolerance (P): In terms of actual effect , Partition is equivalent to the time limit requirement for communication . If the system fails to reach data consistency within the time limit , It means that the partition happened , The current operation must be in C and A Make a choice between .
CAP The essence of the principle is either AP, or CP, or AC, But it doesn't exist CAP. If there is no copy of the data in a distributed system , Then the system must satisfy the strong consistency condition , Because there's only one data , There will be no data inconsistency , here C and P There are two elements , But if the system has network partition status or downtime , Inevitably, some data cannot be accessed , At this point, the availability condition cannot be satisfied , In this case, we get CP System , however CAP Can't satisfy at the same time .
So when designing distributed architecture , Must make a choice . At present, the performance of the system is generally improved by the final consistency of each node in the distributed cache , Cluster data consistency is realized by using data asynchronous replication technology between multiple nodes . Usually use something like memcached And so on. NOSQL As a means of implementation . although memcached It can also be a distributed cluster environment , But for a piece of data , It's always stored on a certain computer memcached Server . In case of network failure or server crash , All data stored on this server will be inaccessible . Because the data is stored in memory , Restart the server , Will result in all data loss . Of course, you can also implement a set of mechanisms by yourself , Used in distributed systems memcached Data synchronization and persistence between , But the implementation is very difficult .
边栏推荐
- 未来刷脸支付是能够占据市场很多的份额
- 期货开户要和客户经理详谈政策
- The business logic of face brushing changed significantly, and merchants vied for war smoke to rise again
- Usage and differences among let, const and VaR
- The difference between for... Of and for... In JS
- vim编辑器全部删除文件内容
- Move protocol launched a beta version, and you can "0" participate in p2e
- What is the difference between foreach and map methods in JS
- 亚马逊测评自养号,如何进行系统性的学习?
- Characteristics of hexadecimal
猜你喜欢
随机推荐
期货开户怎么选择好的期货公司 ?
Analyze the maker education DNA needed in the new era
解析新时代所需要的创客教育DNA
Docker deploys the stand-alone version of redis - modify the redis password and persistence method
How to judge whether a property belongs to an instance object or inherits from a constructor in JS
怎么开立普通商品期货账户
vim编辑器全部删除文件内容
选择正规的资质好的期货公司开户
记一次PG主从搭建及数据同步性能测试流程
Common interview questions in software testing
Usage and differences among let, const and VaR
我的大四
Es time query error - "caused_by": {"type": "illegal_argument_exception", "reason": "failed to parse date field
ES对比两个索引的数据差
刷脸商业逻辑重大改变商户争抢烽烟再起
二十五家互联网大厂软件测试笔试题总结,遇到包过。
手把手教你搭建钉钉预警机器人
GameFi如何破圈,AQUANEE靠真正“P2E”展现风采
Sealem Finance - a new decentralized financial platform based on Web3
Choose a qualified futures company to open an account









