NoSQL databases: Consistency of data

Source: Internet
Author: User

NoSQL database: Consistent read consistency for data
    • Strong consistency
      When visiting any node in the cluster at any time, the data results are consistent;

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

    • Finally consistent
      The data synchronization between nodes in the cluster is inconsistent with the temporary data, but the data synchronization is finished, and finally has the consistency;

Update consistency
    • Pessimistic Way
      使用写锁大幅减少系统响应能力可能导致死锁
    • Optimistic Way
      先让冲突发生。再检測顺序自己主动合并的处理方式极具“领域特定”问题
Easing "consistency constraints"
    • Cap theorem
      Consistency (consistency), availability (availability), and partition tolerance (Partition tolerance), 3 properties can only meet 2 at the same time;

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

    • CA system
        单server  集群中出现”分区“,就不可用
    • Pa/pc
        集群出现”分区“时,须要在”一致性“ 和“可用性”间权衡  通常会牺牲部分一致性(eg:使用终于一致性),保证可用性
Relaxing "persistence" constraints

more stringent durability. means a lot of other performance losses;

    • Sacrificing "persistence" for better performance
    • Replication "Persistence" failure
        主节点故障。未同步到从节点的数据丢失  主节点恢复,故障期间更新的数据冲突  解决方式:针对单个请求指定其所需的持久性
Attached Mind Map

References

The essence of NoSQL

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

NoSQL databases: Consistency of data

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.