SlideShare a Scribd company logo
Beyond Strong 
Consistency 
Models for Consistency in High Performance 
Distributed Systems 
John L. Singleton 
University of Central Florida
A Motivating Example 
“Represents” 
What Happens if we delete a friend from my social graph?
The Problem of Scalability 
del(fn) 
query(f) 
Strong Consistency: With a single database, 
all users see the update after it is committed
The Problem of Scalability (continued) 
Strong Consistency: As more 
database servers are added to 
handle the load, update latency 
increases 
DB1 
query(f) 
del(fn) 
query(f) 
DBn 
sync(f)
The Problem: Scaling a Model of 
Consistency 
• Strong Consistency requires that every update is immediately 
propagated to all nodes. 
• All users have the same view of the data at any moment. 
• However, this is bad for performance and is hard to scale. 
How can we implement a model of consistency that scales?
The CAP “Theorem” 
• Uttered by Eric Brewer at PODC circa 2000 
• Consistency: All users see the same view of the data 
• Availability: The system is always available 
• Partition Tolerance: The system can operate in the presence 
of network failures between nodes. 
• Not really a theorem because no proof of its validity exists.
Beyond Strong Consistency
Some Criticism of the CAP Theorem 
• In the world of NoSQL databases, CAP has been used as an 
excuse to give up consistency 
• However, the cases they are optimizing for (for example, 
partition tolerance) are in fact the most rare 
• Network partition in a local cluster 
• Failure of a single node is much more common 
“One should not throw out the C so quickly, since there are real error 
scenarios where CAP does not apply and it seems like a bad tradeoff in 
many of the other situations.” – Michael Stonebraker
One Possible Solution: Eventual 
Consistency 
Asks the question: “What if we omit the C?” 
• Do updates locally and propagate the changes 
• No foreground synchronization 
• Resists partitioning 
• Requires consensus 
• Consistency is eventual, no definite point in the future.
Some Preliminaries: State-Based Objects 
• Two Views of an Object: State Based and Operation Based 
• State Based: Object is a collection of state transitions
The State-Based View
Causal History of State-Based Objects 
• We need an abstraction to reason about the state an object 
may be in (or may have come from) 
• Each replica can maintain a copy of the causal history.
Definition of Eventual Consistency 
Eventual Delivery: An update delivered at some correct replica 
is eventually delivered to all correct replicas: 
Convergence: Correct replicas that have delivered the same 
updates eventually reach equivalent state: 
Termination: All method executions terminate
Problems with Eventual Consistency 
The Strong Consistency Model 
• In the strong consistency model, users get a 
single view in a specific order, therefore no 
conflicts 
a 
s2.add(a,b) s1.del(a) 
b 
time (increasing)
Problems with Eventual Consistency 
The Eventually Consistency Model 
• This update is invalid! 
• Measures must be taken to handle conflicts 
and perform rollbacks to ensure consistency 
• This results in overhead to the system and 
should be avoided 
a 
s2.del(a) s1.add(a,b) 
b 
time (increasing)
Eventual Delivery: An update delivered at some correct replica 
is eventually delivered to all correct replicas: 
Convergence: Correct replicas that have delivered the same 
updates eventually reach equivalent state: 
Termination: All method executions terminate 
Strong Convergence: Correct replicas that have delivered the 
same updates have equivalent state:
Strong Eventual Consistency 
• Strong Eventual Consistency is a stronger subset of Eventual 
Consistency 
• By placing restrictions on the way in which replicated types are 
constructed, we can provide stronger guarantees. 
• Most importantly: SEC is a solution to the CAP problem 
• Can tolerate up to n-1 concurrent crashes 
• Does not require consensus 
• Is weaker than strong consistency, but provides performance benefits 
and a well defined consistency model. 
• Removes conflicts
Conflict Free Replicated Data Types 
• The key to Strong Eventual Consistency is the Convergent 
Replicated Data Type (CvRDT) 
• Constructed with a monotonic semi-lattice object 
• A set with a partial order 
• And an operation that can find the least upper bound on any two 
objects in the set such that:
CvRDTs and Monotonic Semi-Lattices 
If these conditions are satisfied, you have a CvRDT 
(technical note: State-Based RDTs are equivalent to 
Operation Based RDTs)
Sample CvRDT: A Integer Vector
Set-Based CvRDT 
• How could we apply this idea to a more complex object like a 
set? 
• Create one set, the Addition set, and record all elements added 
• Create another set, the Remove set, and record all elements 
removed. 
• Both sets are monotonic 
• Define the query function as:
Conclusions 
• Introduced the idea of multiple models of consistency: 
• Strong Consistency 
• Eventual Consistency 
• Strong Eventual Consistency 
• Discussed the CAP Theorem and showed how 
performance problems with Strong Consistency lead to 
Eventual Consistency 
• Demonstrated how problems with Eventual Consistency 
can arise 
• Showed how Strong Eventual Consistency is a solution to 
the CAP problem, and can improve the performance and 
reliability of distributed data store systems.
References 
[1] Deftu, Andrei, and Jan Griebsch. "A Scalable Conflict-Free Replicated Set Data Type." 
In Distributed Computing Systems (ICDCS), 2013 IEEE 33rd International Conference on, pp. 186- 
195. IEEE, 2013. 
[2] Shapiro, Marc, Nuno Preguiça, Carlos Baquero, and Marek Zawirski. "Conflict-free replicated data 
types." In Stabilization, Safety, and Security of Distributed Systems, pp. 386-400. Springer Berlin 
Heidelberg, 2011. 
[3] Bouajjani, Ahmed, Constantin Enea, and Jad Hamza. "Verifying eventual consistency of optimistic 
replication systems." In Proceedings of the 41st annual ACM SIGPLAN-SIGACT symposium on 
Principles of programming languages, pp. 285-296. ACM, 2014. 
[4] Vogels, Werner. "Eventually consistent." Communications of the ACM 52, no. 1 (2009): 40-44. 
[5] Stonebraker, Michael. "Errors in database systems, eventual consistency, and the cap 
theorem." Communications of the ACM, BLOG@ ACM (2010). 
[6] Brewer, Eric A. "Towards robust distributed systems." In PODC, p. 7. 2000. 
[7] Lamport, Leslie. "Time, clocks, and the ordering of events in a distributed 
system." Communications of the ACM 21, no. 7 (1978): 558-565. 
[8] Gilbert, Seth, and Nancy Lynch. "Brewer’s Conjecture and the Feasibility of Consistent." Available, 
Partition-Tolerant Web Services. doi 10, no. 564585.564601 (2002).
Questions?

More Related Content

ODP
Consistency in Distributed Systems
PPTX
Global Mutable State Analysis in Spring MVC Applications
PDF
Consistency in Distributed Systems, Part 2
PPT
CAP, PACELC, and Determinism
PDF
Strict-Data-Consistency-in-Distrbuted-Systems-With-Failures
PDF
Scalability
ODP
Distributed systems and consistency
PPTX
Real time operating systems (rtos) concepts 7
Consistency in Distributed Systems
Global Mutable State Analysis in Spring MVC Applications
Consistency in Distributed Systems, Part 2
CAP, PACELC, and Determinism
Strict-Data-Consistency-in-Distrbuted-Systems-With-Failures
Scalability
Distributed systems and consistency
Real time operating systems (rtos) concepts 7

What's hot (13)

PPTX
Real-Time Design Patterns
PPTX
No sql (not only sql)
KEY
Database Throwdown Introduction
PPTX
Cluster
PDF
CAP theorem and distributed systems
PDF
Akka and Kubernetes, the beginning of a beautiful relationship
PDF
An Overview of Distributed Debugging
PPTX
Cluster computing
PPT
Client Centric Consistency Model
PDF
API Performance testing with Gatling
PPT
Consistency protocols
PDF
1 untitled 1ppt
PDF
A Critique of the CAP Theorem by Martin Kleppmann
Real-Time Design Patterns
No sql (not only sql)
Database Throwdown Introduction
Cluster
CAP theorem and distributed systems
Akka and Kubernetes, the beginning of a beautiful relationship
An Overview of Distributed Debugging
Cluster computing
Client Centric Consistency Model
API Performance testing with Gatling
Consistency protocols
1 untitled 1ppt
A Critique of the CAP Theorem by Martin Kleppmann
Ad

Similar to Beyond Strong Consistency (20)

PPTX
CAP Theorem - Theory, Implications and Practices
PDF
Database Consistency Models
PPT
ds7_con.ppt
PDF
Self healing data
PPT
chen-06.ppt
PPT
This is introduction to distributed systems for the revised curiculum
PDF
PWLSD.1 A critique of the cap theorem - Martin Kleppmann
PPTX
cse40822-CAP.pptx
PPTX
Data Engineering for Data Scientists
PDF
Eventual Consistency – Du musst keine Angst haben
PDF
Uwe Friedrichsen - CRDT und mehr - über extreme Verfügbarkeit und selbstheile...
PPTX
Distributed system sans consensus
PPTX
Eventual consistency vs Strong consistency what is the difference
PPTX
Put Your Thinking CAP On
PPTX
NoSQL databases, the CAP theorem, and the theory of relativity
PPTX
Ch-7-Part-2-Distributed-System.pptx
PDF
Eventual Consistency - JUG DA
PDF
Uwe Friedrichsen – Extreme availability and self-healing data with CRDTs - No...
PDF
Thoughts on consistency models
PDF
CM2-Data model for Big Data chapter2.pdf
CAP Theorem - Theory, Implications and Practices
Database Consistency Models
ds7_con.ppt
Self healing data
chen-06.ppt
This is introduction to distributed systems for the revised curiculum
PWLSD.1 A critique of the cap theorem - Martin Kleppmann
cse40822-CAP.pptx
Data Engineering for Data Scientists
Eventual Consistency – Du musst keine Angst haben
Uwe Friedrichsen - CRDT und mehr - über extreme Verfügbarkeit und selbstheile...
Distributed system sans consensus
Eventual consistency vs Strong consistency what is the difference
Put Your Thinking CAP On
NoSQL databases, the CAP theorem, and the theory of relativity
Ch-7-Part-2-Distributed-System.pptx
Eventual Consistency - JUG DA
Uwe Friedrichsen – Extreme availability and self-healing data with CRDTs - No...
Thoughts on consistency models
CM2-Data model for Big Data chapter2.pdf
Ad

Recently uploaded (20)

PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Geodesy 1.pptx...............................................
PPTX
web development for engineering and engineering
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Sustainable Sites - Green Building Construction
PDF
PPT on Performance Review to get promotions
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Construction Project Organization Group 2.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Geodesy 1.pptx...............................................
web development for engineering and engineering
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Internet of Things (IOT) - A guide to understanding
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Sustainable Sites - Green Building Construction
PPT on Performance Review to get promotions
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Operating System & Kernel Study Guide-1 - converted.pdf
bas. eng. economics group 4 presentation 1.pptx
UNIT 4 Total Quality Management .pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Lesson 3_Tessellation.pptx finite Mathematics
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Construction Project Organization Group 2.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf

Beyond Strong Consistency

  • 1. Beyond Strong Consistency Models for Consistency in High Performance Distributed Systems John L. Singleton University of Central Florida
  • 2. A Motivating Example “Represents” What Happens if we delete a friend from my social graph?
  • 3. The Problem of Scalability del(fn) query(f) Strong Consistency: With a single database, all users see the update after it is committed
  • 4. The Problem of Scalability (continued) Strong Consistency: As more database servers are added to handle the load, update latency increases DB1 query(f) del(fn) query(f) DBn sync(f)
  • 5. The Problem: Scaling a Model of Consistency • Strong Consistency requires that every update is immediately propagated to all nodes. • All users have the same view of the data at any moment. • However, this is bad for performance and is hard to scale. How can we implement a model of consistency that scales?
  • 6. The CAP “Theorem” • Uttered by Eric Brewer at PODC circa 2000 • Consistency: All users see the same view of the data • Availability: The system is always available • Partition Tolerance: The system can operate in the presence of network failures between nodes. • Not really a theorem because no proof of its validity exists.
  • 8. Some Criticism of the CAP Theorem • In the world of NoSQL databases, CAP has been used as an excuse to give up consistency • However, the cases they are optimizing for (for example, partition tolerance) are in fact the most rare • Network partition in a local cluster • Failure of a single node is much more common “One should not throw out the C so quickly, since there are real error scenarios where CAP does not apply and it seems like a bad tradeoff in many of the other situations.” – Michael Stonebraker
  • 9. One Possible Solution: Eventual Consistency Asks the question: “What if we omit the C?” • Do updates locally and propagate the changes • No foreground synchronization • Resists partitioning • Requires consensus • Consistency is eventual, no definite point in the future.
  • 10. Some Preliminaries: State-Based Objects • Two Views of an Object: State Based and Operation Based • State Based: Object is a collection of state transitions
  • 12. Causal History of State-Based Objects • We need an abstraction to reason about the state an object may be in (or may have come from) • Each replica can maintain a copy of the causal history.
  • 13. Definition of Eventual Consistency Eventual Delivery: An update delivered at some correct replica is eventually delivered to all correct replicas: Convergence: Correct replicas that have delivered the same updates eventually reach equivalent state: Termination: All method executions terminate
  • 14. Problems with Eventual Consistency The Strong Consistency Model • In the strong consistency model, users get a single view in a specific order, therefore no conflicts a s2.add(a,b) s1.del(a) b time (increasing)
  • 15. Problems with Eventual Consistency The Eventually Consistency Model • This update is invalid! • Measures must be taken to handle conflicts and perform rollbacks to ensure consistency • This results in overhead to the system and should be avoided a s2.del(a) s1.add(a,b) b time (increasing)
  • 16. Eventual Delivery: An update delivered at some correct replica is eventually delivered to all correct replicas: Convergence: Correct replicas that have delivered the same updates eventually reach equivalent state: Termination: All method executions terminate Strong Convergence: Correct replicas that have delivered the same updates have equivalent state:
  • 17. Strong Eventual Consistency • Strong Eventual Consistency is a stronger subset of Eventual Consistency • By placing restrictions on the way in which replicated types are constructed, we can provide stronger guarantees. • Most importantly: SEC is a solution to the CAP problem • Can tolerate up to n-1 concurrent crashes • Does not require consensus • Is weaker than strong consistency, but provides performance benefits and a well defined consistency model. • Removes conflicts
  • 18. Conflict Free Replicated Data Types • The key to Strong Eventual Consistency is the Convergent Replicated Data Type (CvRDT) • Constructed with a monotonic semi-lattice object • A set with a partial order • And an operation that can find the least upper bound on any two objects in the set such that:
  • 19. CvRDTs and Monotonic Semi-Lattices If these conditions are satisfied, you have a CvRDT (technical note: State-Based RDTs are equivalent to Operation Based RDTs)
  • 20. Sample CvRDT: A Integer Vector
  • 21. Set-Based CvRDT • How could we apply this idea to a more complex object like a set? • Create one set, the Addition set, and record all elements added • Create another set, the Remove set, and record all elements removed. • Both sets are monotonic • Define the query function as:
  • 22. Conclusions • Introduced the idea of multiple models of consistency: • Strong Consistency • Eventual Consistency • Strong Eventual Consistency • Discussed the CAP Theorem and showed how performance problems with Strong Consistency lead to Eventual Consistency • Demonstrated how problems with Eventual Consistency can arise • Showed how Strong Eventual Consistency is a solution to the CAP problem, and can improve the performance and reliability of distributed data store systems.
  • 23. References [1] Deftu, Andrei, and Jan Griebsch. "A Scalable Conflict-Free Replicated Set Data Type." In Distributed Computing Systems (ICDCS), 2013 IEEE 33rd International Conference on, pp. 186- 195. IEEE, 2013. [2] Shapiro, Marc, Nuno Preguiça, Carlos Baquero, and Marek Zawirski. "Conflict-free replicated data types." In Stabilization, Safety, and Security of Distributed Systems, pp. 386-400. Springer Berlin Heidelberg, 2011. [3] Bouajjani, Ahmed, Constantin Enea, and Jad Hamza. "Verifying eventual consistency of optimistic replication systems." In Proceedings of the 41st annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 285-296. ACM, 2014. [4] Vogels, Werner. "Eventually consistent." Communications of the ACM 52, no. 1 (2009): 40-44. [5] Stonebraker, Michael. "Errors in database systems, eventual consistency, and the cap theorem." Communications of the ACM, BLOG@ ACM (2010). [6] Brewer, Eric A. "Towards robust distributed systems." In PODC, p. 7. 2000. [7] Lamport, Leslie. "Time, clocks, and the ordering of events in a distributed system." Communications of the ACM 21, no. 7 (1978): 558-565. [8] Gilbert, Seth, and Nancy Lynch. "Brewer’s Conjecture and the Feasibility of Consistent." Available, Partition-Tolerant Web Services. doi 10, no. 564585.564601 (2002).