NoSQL databases: data consistency, nosql Database Consistency
NoSQL Database: Data Consistency
Read consistency
High Consistency
Access any node in the cluster at any time, and the data obtained is consistent;
User consistency is consistent with the data obtained during cluster access for the same user;
Solve user consistency: Use a sticky session to bind the session to a specific node for processing;
This will reduce the performance of the Load balancer;
Final consistency
Temporary data inconsistency occurs between nodes in the cluster due to delayed data synchronization. However, after data synchronization is completed, the data consistency is achieved;
Update consistency
- Pessimistic Mode
The use of write locks significantly reduces system response capabilities and may lead to deadlocks.
- Optimistic
Conflict occurs first, and then the processing method of automatic merging of sequence is extremely "domain-specific ".
Relax "consistency constraints"
- CAP Theorem
Consistency, Availability, and Partition tolerance. The three attributes can only satisfy two at the same time;
Partition tolerance explanation: the cluster is still available when it is divided into multiple due to communication faults
- CA system
"Partition" is not available in a single server cluster
- PA/PC
When a "partition" occurs in a cluster, the trade-off between "consistency" and "availability" generally sacrifices partial consistency (eg: Use final consistency) to ensure availability.
Relax "persistence" constraints
More Strict Persistence means more performance loss;
Mind Map
Reference
NoSQL Essence
Posted by: Large CC | 30JUN, 2014
Blog: blog.me115.com [subscription]
Weibo: Sina Weibo
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.