Consistency in distributed systems, isolation levels from the database

Source: Internet
Author: User

consistency is the synchronization feature that describes multiple replicas (in this article we do not discuss the case of a multi-copy of the data in a distributed database that keeps the data in multiple shards consistent with the business logic). Generally from two angles to study:

From a global data point of view:

      1. Strong consistency: Whoever, whenever you read, gets the results of the most recent write
      2. Linear consistency: If the read and write operations are ordered according to strict timestamp, the reading and writing of each process follows the result of that sort
      3. Sequential consistency: The sequence of read and write operations for each process is consistent, but not guaranteed in timestamp order
      4. Causal consistency: Two processes that have a causal relationship (read and write the same data), read and write in the same order, do not guarantee the timestamp sequence, and the independent process can read and write in a different order
      5. General consistency: The ultimate consistency in the traditional sense, the data on each copy is ultimately the same value

From a client point of view:

      1. Write after read: the same client, no matter where to read and write, after writing, read out is always not old in just write
      2. Read and write: The same client, no matter where to read and write, after reading, is always written in the number of just read out on the basis of (probably more than the read out on the basis of a new)
      3. Monotone read: The same client, no matter where to read, each time the read out is not older than the last read out
      4. Monotone write: The same client, regardless of where it is written, is written on the last write basis (perhaps more recent than the last write)
      5. Finally consistent: The same client, no matter where to read and write, do a number of reads and writes, after a period of time, see a stable constant value

These two angles are not one by one corresponding relationships. For example, the "strong consistency" of the global data angle is stronger than the "client angle" post-write read because there may be multiple clients running concurrently. When we design architecture for a business application, we look at the problem from the client's point of view.

The isolation level , which is the visibility of data between transactions, is discussed in the "parallel write process, or some written (committed) and some that have not yet been actually written (uncommitted) in this process", while the consistency study is what happens when everyone writes, ignoring the writing process, Consider it an atomic operation. The isolation level and consistency are orthogonal relationships.

Consistency in distributed systems, isolation levels from the database

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.