SlideShare a Scribd company logo
Eventually
                        Consistent
                         wspringer@xebia.com




woensdag 21 juli 2010
Werner
                        Vogels




woensdag 21 juli 2010
‘60s         ‘90s
                  Distribution   Minimize
                 Transparency     Failure

woensdag 21 juli 2010
Client
                        Perspective




woensdag 21 juli 2010
Model

                                    B
                        A
                                    C


woensdag 21 juli 2010
Strong Consistency
                                       1
                                                   0   value = "foo"

                                           value = "bar"                2
                                                                                       B
                            A
                                                                       value = "bar"


                                                                        2



                                                                                       C
                                       2                        value = "bar"
                                           value = "bar"




                        After the update, any subsequent access will return the
                        updated value.




woensdag 21 juli 2010
Weak Consistency
                                                                                           B
                                                   0     value = "foo"

                                                                          >1
                                        1   value = "bar"




                              A
                                                                   value = "bar" / "foo"


                                                                          >1




                                                                                           C
                                            value = "bar" /    value = "bar" / "foo"
                                       >1       "foo"




                        The system does not guarantee that at any given point in
                        the future subsequent access will return the updated
                        value




woensdag 21 juli 2010
Eventual Consistency
                                                                                          B
                                                     0    value = "foo"

                                           1   value = "bar"                t



                              A
                                                                          value = "bar"


                                                                                t




                                                                                          C
                                                                   value = "bar"
                                       t       value = "bar"


                                                  t≥1




                        If no updates are made to the object, eventually all
                        accesses will return the last updated value.




woensdag 21 juli 2010
Causal Consistency
                                            2   notification of update




                                                                                        B
                                                  0    value = "foo"

                                        1   value = "bar"                3



                                A
                                                                        value = "bar"


                                                                             3




                                                                                        C
                                                                 value = "foo"




                        Subsequent access by process B will return the updated
                        value, and a write is guaranteed to supersede the earlier
                        write.




woensdag 21 juli 2010
Read-your-writes
                                 Consistency
                                                                        B
                                                   0    value = "foo"

                                         1   value = "bar"




                               A
                                                                        C
                                         2   value = "bar"




                        Process A, after updating a data item always access the
                        updated value and never sees an older value




woensdag 21 juli 2010
Session Consistency
                                                                                   B
                                  Session 1
                                                               0   value = "foo"

                                         1    value = "bar"




                              A           2   value = "bar"




                                          2    value = "foo"
                                                                                   C
                                  Session 2



                        Within the “session”, the system guarantees read-your-
                        writes consistency




woensdag 21 juli 2010
Monotonic Read
                                  Consistency
                                                                                 B
                                                             0   value = "foo"



                                                                 value = "bar"



                             A
                                                                        3
                                         1   value = "foo"




                                                                                 C
                                         2   value = "foo"

                                         4   value = "bar"



                        If a process has seen a particular value for the object, any
                        subsequent access will never return any previous values




woensdag 21 juli 2010
Monotonic Write
                                 Consistency
                                                                                B
                                                            0   value = "foo"




                             A
                                            value = "bar"
                                       1


                                       2



                                                                                C
                                           value = "last"




                        The system guarantees to serialize the writes by the
                        same process




woensdag 21 juli 2010
Eventual Consistentency
                              in RDBMS
                                                         Log shipping


                                               Primary                  Backup replica




                             A
                                      1

                                                          async
                                      2

                                          3




                        Eventual consistency is not just a property of NoSQL
                        Solutions




woensdag 21 juli 2010
Server
                        Perspective




woensdag 21 juli 2010
NRW

                        N The number of nodes that store replicates of the data
                        W The number of replicas that need to acknowledge the
                           receipt of the update before the update completes

                        R The number of replicas that are contacted when a data
                           object is accessed through a read operation




woensdag 21 juli 2010
Strong Consistency
                                             W=3                   value = "foo"



                                                   value = "foo"




                                     A
                                                                   value = "foo"




                              N=4
                                                                   value = "foo"




                                              R=2
                        W + R > N implies strong consistency




woensdag 21 juli 2010
Optimizations


                        • Optimize read: R = 1, N = W
                        • Optimize write: W = 1, N = R




woensdag 21 juli 2010
Design Considerations


                        • Clients implementing read-your-writes and monotonic
                           reads, by adding versions on writes, and discarding
                           everything the precedes the last-seen version.




woensdag 21 juli 2010

More Related Content

PPT
The msg box function and the messagebox class
PDF
Visual Basic IDE Introduction
PPT
Introduction To Website Development
PPTX
Web development
PPTX
Introduction to Web Architecture
PPT
Visual Basic menu
PPTX
Introduction to inheritance and different types of inheritance
PPTX
Digital Certificate Verification based on blockchain ethereum
The msg box function and the messagebox class
Visual Basic IDE Introduction
Introduction To Website Development
Web development
Introduction to Web Architecture
Visual Basic menu
Introduction to inheritance and different types of inheritance
Digital Certificate Verification based on blockchain ethereum

What's hot (20)

PPTX
Blockchain
PPTX
swings.pptx
DOCX
Online grocery store
PPT
Introduction to Visual Studio.NET
PPTX
Publish Subscribe pattern - Design Patterns
PPTX
PPSX
Java rmi
PPTX
Blockchain, Ethereum and Business Applications
PPTX
Blockchain Technology ppt project.pptx
PPTX
USES OF THE COMPUTER NETWORK
PDF
Medical store system
PPTX
Intro to Java
ODP
Https presentation
PPTX
Servlets
PDF
Web3 Fundamentals
PPT
Web server
PPTX
Ten Blockchain Applications
PPTX
Network protocals
PPTX
Flutter presentation.pptx
PPT
Visual basic ppt for tutorials computer
Blockchain
swings.pptx
Online grocery store
Introduction to Visual Studio.NET
Publish Subscribe pattern - Design Patterns
Java rmi
Blockchain, Ethereum and Business Applications
Blockchain Technology ppt project.pptx
USES OF THE COMPUTER NETWORK
Medical store system
Intro to Java
Https presentation
Servlets
Web3 Fundamentals
Web server
Ten Blockchain Applications
Network protocals
Flutter presentation.pptx
Visual basic ppt for tutorials computer
Ad

More from Wilfred Springer (13)

PDF
Unfiltered Unveiled
PPTX
Scala in your organisation
PDF
Simplicity
KEY
Unfiltered Unveiled
PDF
NoSQL Rollercoaster
PDF
Byzantine Generals
KEY
Into the Wild
PDF
OOPSLA Talk on Preon
PDF
Spring ME JavaOne
PDF
Spring ME
PDF
Preon (J-Fall 2008)
Unfiltered Unveiled
Scala in your organisation
Simplicity
Unfiltered Unveiled
NoSQL Rollercoaster
Byzantine Generals
Into the Wild
OOPSLA Talk on Preon
Spring ME JavaOne
Spring ME
Preon (J-Fall 2008)
Ad

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Big Data Technologies - Introduction.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
KodekX | Application Modernization Development
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
MYSQL Presentation for SQL database connectivity
Network Security Unit 5.pdf for BCA BBA.
Review of recent advances in non-invasive hemoglobin estimation
NewMind AI Weekly Chronicles - August'25 Week I
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Advanced methodologies resolving dimensionality complications for autism neur...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Diabetes mellitus diagnosis method based random forest with bat algorithm
“AI and Expert System Decision Support & Business Intelligence Systems”
20250228 LYD VKU AI Blended-Learning.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Spectral efficient network and resource selection model in 5G networks
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Big Data Technologies - Introduction.pptx
sap open course for s4hana steps from ECC to s4
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)

Eventually Consistent

  • 1. Eventually Consistent wspringer@xebia.com woensdag 21 juli 2010
  • 2. Werner Vogels woensdag 21 juli 2010
  • 3. ‘60s ‘90s Distribution Minimize Transparency Failure woensdag 21 juli 2010
  • 4. Client Perspective woensdag 21 juli 2010
  • 5. Model B A C woensdag 21 juli 2010
  • 6. Strong Consistency 1 0 value = "foo" value = "bar" 2 B A value = "bar" 2 C 2 value = "bar" value = "bar" After the update, any subsequent access will return the updated value. woensdag 21 juli 2010
  • 7. Weak Consistency B 0 value = "foo" >1 1 value = "bar" A value = "bar" / "foo" >1 C value = "bar" / value = "bar" / "foo" >1 "foo" The system does not guarantee that at any given point in the future subsequent access will return the updated value woensdag 21 juli 2010
  • 8. Eventual Consistency B 0 value = "foo" 1 value = "bar" t A value = "bar" t C value = "bar" t value = "bar" t≥1 If no updates are made to the object, eventually all accesses will return the last updated value. woensdag 21 juli 2010
  • 9. Causal Consistency 2 notification of update B 0 value = "foo" 1 value = "bar" 3 A value = "bar" 3 C value = "foo" Subsequent access by process B will return the updated value, and a write is guaranteed to supersede the earlier write. woensdag 21 juli 2010
  • 10. Read-your-writes Consistency B 0 value = "foo" 1 value = "bar" A C 2 value = "bar" Process A, after updating a data item always access the updated value and never sees an older value woensdag 21 juli 2010
  • 11. Session Consistency B Session 1 0 value = "foo" 1 value = "bar" A 2 value = "bar" 2 value = "foo" C Session 2 Within the “session”, the system guarantees read-your- writes consistency woensdag 21 juli 2010
  • 12. Monotonic Read Consistency B 0 value = "foo" value = "bar" A 3 1 value = "foo" C 2 value = "foo" 4 value = "bar" If a process has seen a particular value for the object, any subsequent access will never return any previous values woensdag 21 juli 2010
  • 13. Monotonic Write Consistency B 0 value = "foo" A value = "bar" 1 2 C value = "last" The system guarantees to serialize the writes by the same process woensdag 21 juli 2010
  • 14. Eventual Consistentency in RDBMS Log shipping Primary Backup replica A 1 async 2 3 Eventual consistency is not just a property of NoSQL Solutions woensdag 21 juli 2010
  • 15. Server Perspective woensdag 21 juli 2010
  • 16. NRW N The number of nodes that store replicates of the data W The number of replicas that need to acknowledge the receipt of the update before the update completes R The number of replicas that are contacted when a data object is accessed through a read operation woensdag 21 juli 2010
  • 17. Strong Consistency W=3 value = "foo" value = "foo" A value = "foo" N=4 value = "foo" R=2 W + R > N implies strong consistency woensdag 21 juli 2010
  • 18. Optimizations • Optimize read: R = 1, N = W • Optimize write: W = 1, N = R woensdag 21 juli 2010
  • 19. Design Considerations • Clients implementing read-your-writes and monotonic reads, by adding versions on writes, and discarding everything the precedes the last-seen version. woensdag 21 juli 2010