Introduction: there are more than N workers running on various hardware devices, and any worker can solve one problem independently. Each cluster has thousands or even hundreds of such devices, and at the same time, such clusters connect and interact with each other. Therefore, such a general set is called "Cloud ", its services are called cloud computing ".
Any device or cluster on the cloud can be "free in and out", and any crashed worker can be detected and restarted. Therefore, it can basically be called a reliable cloud computing.
It provides guidance for understanding cloud storage and cloud computing, Cap, base, acid, and eventual Consistency Principles.
Cap(Consistency-availability-partition tolerance consistency, availability (readable when writing, writable when reading), partition adequacy), research has proved that for data systems, to meet the requirements of the three elements, You must relax the requirements of the third element, that is, the three cannot have both sides. However, for Distributed Systems, partition adequacy is a required requirement, therefore, consistency and availability must be discarded in the Design of Distributed Systems.
Traditional databases generally use CA for High Consistency and availability.
Nosql, cloud storage, and so on are generally used to reduce the cost of consistency to get another two factors
Acid: According to the CAP method, acid is widely used in many ca-type relational databases:
A: atomicity. As the smallest unit, a transaction is either not executed or fully executed.
C: consistency. A transaction transfers an object from a valid state to another valid State. If the transaction fails, the object is restored to the previous valid state. That is, the integrity constraints of the database are not damaged before and after the transaction starts.
I: Isolation independence (isolation). The execution of a transaction does not interfere with each other. It is impossible for a transaction to see the data at a certain time point in the middle when other transactions are running.
D: Durability: after the transaction is completed, the changes made by the transaction to the database will be permanently stored in the database and will not be rolled back.
Base: Generally, high consistency is sacrificed in exchange for availability and distribution.
BA: basically aavilable: occasional failure is allowed, as long as the system is available in most cases.
S: Soft State: data at any time is not required to be synchronized
E: eventual consistency: data must be consistent within a certain period of time
Cloud storage is used as an example: currently, most cloud storage uses acid as a whole. Because Distributed Multi-backup is used, eventual consistency is adopted.