CAP principle of distributed system

CAP principle of distributed system

Definition of CAP principle

A distributed system cannot simultaneously ensure consistency (Consistency), availability (Availability) and partition tolerance (Partition Tolerance) .

① The CAP principle, also known as CAP theorem, refers to Consistency, Availability and Partition tolerance in a distributed system. The CAP principle means that the three elements can achieve at most two at the same time, not all three.

The specific meanings are as follows:
Consistency : any transaction should be atomic, and the state on all replicas is the result of the successful commit of the transaction, and maintain strong consistency;
Availability : the system (non-failure node) can The response to the operation request is completed within a limited time;
Partition Tolerance (Partition Tolerance) : The network in the system may have a partition failure (become multiple subnets, or even nodes go online and offline), that is, the communication between nodes cannot be guaranteed. The network failure should not affect the normal service of the system.

The CAP principle holds that a distributed system can only guarantee at most two of the three properties.
And due to the current network communication situation, delayed packet loss, network interruption, or other force majeure caused network failure and other issues, partition tolerance must be satisfied under normal circumstances, and generally choose one side between consistency and availability .

Guess you like

Origin blog.csdn.net/William__Ma/article/details/128946875