Redis Learning Note (v)--distributed database cap principle

Source: Internet
Author: User
Tags redis
acid for traditional databases

atomicity Atomic Nature

All operations inside the transaction are either done or not, and the transaction succeeds because all operations in the transaction are successful, and as long as one operation fails, the entire transaction fails and needs to be rolled back.

Consistency consistency

The database is always in a consistent state, and the operation of the transaction does not alter the original consistency constraints of the database.

Isolation independence

Concurrent transactions do not affect each other, and if the data to be accessed by one thing is being modified by another transaction, the data that he accesses is not affected by uncommitted transactions as long as another transaction is not committed.

Durability Persistence

Once a transaction is committed, the changes he makes will be permanently stored on the database, and the CAP will not be lost even if there is an outage

Consistency Strong consistency
Availability Availability
Partition tolerance partition fault tolerance cap 3 in 2


The core of the CAP theory is that a distributed system cannot meet the three requirements of consistency, availability, and partition fault tolerance at the same time, and can only satisfy two at the same time.
Therefore, according to the CAP principle, the NoSQL database is divided into three categories which satisfy the CA principle, the CP principle and the AP principle:

ca– single-point clusters, systems that meet consistency, availability, and are often less scalable
cp– satisfies the system of consistency, partition tolerance, usually performance is not particularly high
ap– systems that meet availability, partitioning tolerance, and often may have lower consistency requirements

Because the current network hardware is bound to have problems such as delayed packet loss, " partition fault tolerance is what we need to achieve ", so we can only trade between consistency and availability, no NoSQL system can guarantee the three points. BASE

The solution proposed by base in order to solve the problem caused by the strong consistency of relational database and the decrease of usability.

Basic available (basically Available)
Soft states (Soft state)
Final agreement (eventually consistent)

By allowing the system to relax the requirements for data consistency at a particular moment in exchange for overall scalability and performance improvements. Introduction to distributed and clustered

Distributed: Different multiple servers are deployed with different module projects
Cluster: Different multiple servers deploy the same module engineering

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.