当前位置:网站首页>On cap theorem in distributed system development technology

On cap theorem in distributed system development technology

2022-06-26 23:15:00 Concealed wind

1、 Definition

CAP Theorem (CAPtheorem), It's also called brewer's theorem (Eric Brewer) , 1998 For the first time in .

 Insert picture description here

It was originally proposed that distributed data storage cannot provide more than two of the following three guarantees at the same time :

Uniformity (Consistency): The information received each time is up-to-date .
Usability (Availability): Every request will receive ( Non error ) Respond to .
Partition fault tolerance (Partition tolerance): Although the network between nodes is not connected, resulting in zoning , The system is still running .

2、CAB Theorem practice

2.1 CP Strong consistency

![ Insert picture description here ](https://img-blog.csdnimg.cn/9a6b87afa53d4232b773df7d34f08226.png#pic_center =400x400)
Definition

Achieve consistency and partition fault tolerance , This combination is a data strong consistency pattern , That is, the data of multiple services must be consistent , At the expense of usability . Used in some scenarios that require high data consistency , For example, money related .

Middleware to achieve strong consistency includes zookeeper.

2.2 AP High availability

![ Insert picture description here ](https://img-blog.csdnimg.cn/faec6c83c1f44166abaaea14d96438f6.png#pic_center =400x400)
Definition

Meet availability and partition fault tolerance , Generally, the requirements for data consistency are not high . In case of failure , As long as not all nodes hang up , Then the cluster can still work normally .

Middleware for high availability Eureka, stay spring cloud It often appears as a registry in .

原网站

版权声明
本文为[Concealed wind]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206262253293894.html