Presentation is loading. Please wait.

Presentation is loading. Please wait.

CONSISTENCY IN DISTRIBUTED SYSTEMS

Similar presentations


Presentation on theme: "CONSISTENCY IN DISTRIBUTED SYSTEMS"— Presentation transcript:

1 CONSISTENCY IN DISTRIBUTED SYSTEMS
Mante Luo, Yu Qiu CS 455: Introduction to Distributed Systems Computer Science Department, Colorado State University

2 Why Consistent? Distributed System is widely deployed
Same data stored at different locations All replications have to follow some rules Consistency has to be maintained e.g. Two withdraws at two locations from the same bank account. If not consistent, final balance could be incorrect.

3 The Problem Replicas: Fault tolerance and performance
Conflicts: Possible when concurrent writing Consistency: Maintain a updating order across all replicas e.g. First Machine A updates the value a to variable X, and then Machine B updates b to X. All replicas should have a consensus that the latest value is b.

4 Model Design Consistency Performance CAP Theorem Strong consistency
Weaker consistency Performance CAP Theorem Consistency, Availability, Partition Tolerance Choose at most 2 Usually trade-off between C & A.

5 Dominant Approach Models Give up some consistency Strong consistency
Sequential consistency (weaker than strong one) Eventual consistency (much weaker) Give up some consistency We got Eventual consistency

6 Dominant Approach cont.
Eventual Consistency if no new updates are made to a data item, eventually all access to that item will return the last updated value much weaker, but with additional mechanisms, eventual consistency is often strongly consistent provide much better performance as well Application: Recent NoSQL databases

7 Quite Surprisingly How can a weak consistency like eventual consistency actually work? It may not seem to work at first glance, but with breakthrough in recent a few years, it works not only good, many major NoSQL vendors adopt it, e.g. Dynamo, Google Cloud Datastore, CouchDB.

8 Future Globally-Distributed System Outer space colonies
deploy systems everywhere on earth Google Spanner Outer space colonies Colonies in another planet can be separated by geographic conditions, distributed systems have to keep in consistency

9 Make It Work in Future Is there a model stronger than eventual consistency, while still works considerably well in performance? In the future, the system will be scaled up Though eventual consistency works good now, giving up some consistency makes it not suitable for some conditions. Stronger model will make application programmer easier to work.

10 Thank You! Any questions?


Download ppt "CONSISTENCY IN DISTRIBUTED SYSTEMS"

Similar presentations


Ads by Google