NoSQL databases: Consistency of data

Source: Internet
Author: User

NoSQL database: Consistent read consistency for data
    • Strong consistency
      Access to any node in the cluster at any time, resulting in consistent data results;

    • User consistency
      The same user, access to the cluster during the data consistent;
      Resolve user consistency: Use sticky sessions to bind sessions to specific nodes for processing;
      This reduces the performance of the load balancer;

    • Final consistency
      The data synchronization between the nodes in the cluster is inconsistent with the temporary data, but after the data synchronization is complete, the final consistency is achieved.

Update consistency
    • Pessimistic Way

      Using write locks to significantly reduce system responsiveness can lead to deadlocks
    • Optimistic Way

      Let the conflict happen first, and then the process of automatic merging is very “ domain-specific ” problem
Easing consistency constraints
    • Cap theorem
      Consistency (consistency), availability (availability), and partition tolerance (Partition tolerance), 3 properties can only meet 2 at a time;

Explanation of partition tolerance: clusters are still available if the cluster is divided into multiple communications failures

    • CA system

      A partition appears in a single-server cluster and is not available
    • Pa/pc

      When a cluster is partitioned, a tradeoff between consistency and availability is typically sacrificed partial consistency (eg: using eventual consistency) to ensure availability
Easing persistent constraints

More stringent durability means more performance loss;

    • Sacrificing persistence for better performance

    • Replication Persistence failure

      Primary node failure, synchronization to data loss from node recovery, data conflict resolution updated during failure solution: Specify the persistence required for a single request
Attached Mind Map

650) this.width=650; "style=" border:0px; "title=" NoSQL: Data Consistency "src=" http://images.cnitblog.com/blog/90573/201406/ 301034450432547.png "alt=" NoSQL: Data Consistency "width=" "height=" 608 "border=" 0 "/>

Reference

The essence of NoSQL

Posted by: Big CC | 02jul,2014
Blog: blog.me115.com [Subscribe]
Weibo: Sina Weibo

This article is from the "Colin" blog, make sure to keep this source http://me115.blog.51cto.com/86104/1433356

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.