NoSQL databases: Consistency of data
Read consistency
Strong consistency
Access to any node in the cluster at any time, resulting in consistent data results;
User consistency for the same user, access to the data during the cluster is 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 occur first, and then the process of automatic merging of sequential detection 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
"Partition" appears in a single-server cluster, is not available
- Pa/pc
When a cluster is "partitioned," the tradeoff between "consistency" and "availability" is typically sacrificed partial consistency (eg: using eventual consistency) to ensure availability
Relaxing "persistence" constraints
More stringent durability means more performance loss;
Attached Mind Map
Reference
The essence of NoSQL
Posted by: Big CC | 30jun,2014
Blog: blog.me115.com [Subscribe]
Weibo: Sina Weibo
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
NoSQL databases: Consistency of data