The CAP theory is the basis of a NoSQL database that represents consistency (strong consistency), availability (availability), Partition tolerance (partition fault tolerance), and the data system can only meet two of these features.
C: The system is still in a consistent state after performing an operation. In a distributed system, when the update operation succeeds, all users are able to read the latest value, and such a system is considered strong consistency.
A: The operation performed by the user must return a result within a certain period of time. If a timeout occurs, then the operation is rolled back, as did the operation.
P: Distributed system is composed of multiple partition nodes, each partition node is a separate Server,p attribute indicates that the system can handle the dynamic join and leave of partition node.
When building a distributed system, you must consider the CAP feature. The traditional relational db, which focuses on CA features, is typically stored on a single server. Distributed storage and processing systems that deal with massive amounts of data pay more attention to AP,AP priority than C, but NoSQL does not completely abandon the eventual consistency of consistency,nosql retention data (eventually consistency). Final consistency means that after the update operation is complete, the user will eventually read the value after the data update, but there will be a certain time window, the user will still read the old data before the update, and after a certain time delay, the data is consistent.
The theoretical basis of NoSQL: CAP