SlideShare a Scribd company logo
2
Most read
3
Most read
11
Most read
Eventual consistency vs Strong consistency what is the difference
Eventual Consistency vs Strong Consistency
What is Eventual Consistency?
Eventual consistency is a theoretical guarantee that, provided no new updates to an
entity are made, all reads of the entity will eventually return the last updated value.
The Internet Domain Name System (DNS) is a well-known example of a system with
an eventual consistency model. DNS servers do not necessarily reflect the latest
values but, rather, the values are cached and replicated across many directories over
the Internet. It takes a certain amount of time to replicate modified values to all DNS
clients and servers. However, the DNS system is a very successful system that has
become one of the foundations of the Internet. It is highly available and has proven to
be extremely scalable, enabling name lookups to over a hundred million devices
across the entire Internet.
What is Strong Consistency?
In contrast, traditional relational databases have been designed based on the concept
of strong consistency, also called immediate consistency. This means that data
viewed immediately after an update will be consistent for all observers of the entity.
To have strong consistency, developers must compromise on the scalability and
performance of their application. Simply put, data has to be locked during the period
of update or replication process to ensure that no other processes are updating the
same data.
Eventual Consistency Use case
Eventual consistency is a consistency model that enables the data store to be highly
available. It is also known as optimistic replication & is key to distributed systems
•Think of a popular microblogging site deployed across the world in different
geographical regions like Asia, America, and Europe. Moreover, each geographical
region has multiple data center zones: North, East, West, and South.
•The data store service is highly available. Even if a few nodes go down persistence
service is still up. Let’s say a celebrity makes a post on the website that everybody
starts liking around the world.
•At a point in time, a user in Japan likes a post which increases the “Like” count of the
post from say 100 to 101. At the same point in time, a user in America, in a different
geographical zone, clicks on the post, and he sees “Like” count as 100, not 101.
Eventual Consistency Use case
Eventual consistency is a consistency model that enables the data store to be highly
available. It is also known as optimistic replication & is key to distributed systems
•Think of a popular microblogging site deployed across the world in different
geographical regions like Asia, America, and Europe. Moreover, each geographical
region has multiple data center zones: North, East, West, and South.
•At a point in time, a user in Japan likes a post which increases the “Like” count of the
post from say 100 to 101. At the same point in time, a user in America, in a different
geographical zone, clicks on the post, and he sees “Like” count as 100, not 101.
•the new updated value of the Post “Like” counter needs some time to move from
Japan to America and update server nodes running there. Though the value of the
counter at that point in time was 101, the user in America sees old inconsistent values.
•But when he refreshes his web page after a few seconds “Like” counter value shows
as 101. So, data was initially inconsistent but eventually got consistent across server
nodes deployed around the world. This is what eventual consistency is.
Strong Consistency Use case
Strong Consistency simply means the data must be strongly consistent at all times. All
the server nodes across the world should contain the same value as an entity at any
point in time.
• So, once a user in Japan updates the “Like” counter from 100 to 101. The value gets
replicated globally across all nodes. Once all nodes reach consensus, locks get
lifted. Now, other users can Like posts.
• If the nodes take a while to reach a consensus, they must wait until then. Well, this is
surely not desired in the case of social applications. But think of a stock market
application where the users are seeing different prices of the same stock at one point
in time and updating it concurrently. This would create chaos. Therefore, to avoid this
confusion we need our systems to be Strongly Consistent
• The nodes must be locked down for updates. Queuing all requests is one good way
of making a system Strongly Consistent. The strong Consistency model hits the
capability of the system to be Highly Available & perform concurrent updates.
Eventual Consistency
Whenever we use multiple replicas of a database to store data and let’s say a
write request comes to one of the replicas. In such a situation, Databases had to
discover a strategy to make this write request at one replica reach other replicas
so that they all could also write data of the request and become consistent.
Eventual consistency makes sure that data of each node of the database gets
consistent eventually. Time taken by the nodes of the database to get consistent
may or may not be defined.
Data getting consistent eventually means it will take time for updates to reach
other replicas. So what?This implies that if someone reads from a replica which is
not updated yet (since replicas are updated eventually) then it may return stale
data.
Strong Consistency
It says data will get passed on to all the replicas as soon as a write request
comes to one of the replicas of the database. But during the time these replicas
are being updated with new data, response to any subsequent read/write
requests by any of the replicas will get delayed as all replicas are busy in keeping
each other consistent.
As soon as they become consistent, they start to take care of the requests that
have come at their door.
Eventual Consistency
Eventual consistency guarantees that if an update is made to the data of a node (say
node N), then the updated value will eventually be propagated to all the replicas of that
node and eventually all the replica will become consistent to the original node(N).
Nodes will get eventually consistent means it will take time for updates to reach other
replicas.
Hence eventual consistency is a consistency model used to achieve high availability
and is a weak consistency model.
Strong Consistency
In contrast to eventual consistency, Strong consistency guarantee that if an update is
made to a node (say N), then the updated value will be propagated to all the
replicas(N1 & N2) of the node(N), immediately in other words after the update
completes, any subsequent access (to N, N1, or N2) will always return the updated
value.
Note during the time these replicas are being updated with new data, any read/write
request to any of these replicas will get delayed as all replicas are busy in keeping
each other consistent and once they will become consistent with the original node they
will start accepting read/write request again.
Eventual Consistency
An eventually consistent model guarantees that whenever an update is made at a node
of a distributed system, it will eventually be replicated across all the nodes, as long as
no new updates are made to the entity during this time.
This makes the data at all the nodes consistent to the original
node eventually. Eventually, all the clients will see the update. Here, the stress is
on ‘eventual’, which means it can take some time before the updated value is
synchronized across all the nodes.
Strong Consistency
In a strongly consistent system, all the replicas are updated with the most recent value
as soon as any one of the replicas responds to a write request. However, during the
time interval that the data is being updated in the replicas, all read/write requests made
to any of the replicas will be delayed. The replicas will only respond to the request once
all the nodes receive the update. In other words, the client will get a response for their
request once all the nodes of the system are consistent.
THANK YOU
Like the Video and Subscribe the Channel

More Related Content

PPTX
Azure App Service
PPTX
Software project management Improving Team Effectiveness
PPT
McCall's Quality Factors
PPTX
Microservice Architecture Software Architecture Microservice Design Pattern
PPTX
Emerging Practices in Asset Management International, United States & New York
PPTX
CS8791 Unit 2 Cloud Enabling Technologies
PPTX
Microsoft azure
ODP
Devops Devops Devops
Azure App Service
Software project management Improving Team Effectiveness
McCall's Quality Factors
Microservice Architecture Software Architecture Microservice Design Pattern
Emerging Practices in Asset Management International, United States & New York
CS8791 Unit 2 Cloud Enabling Technologies
Microsoft azure
Devops Devops Devops

What's hot (20)

PPTX
Introduction to Kubernetes
PPTX
Microsoft Azure
PPTX
Introduction to Azure monitor
PPTX
Cloud computing intro
PDF
DevOps Powerpoint Presentation Slides
PPTX
Google Firebase
PDF
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
PDF
Introduction to Cloud Computing
PPTX
Immutable Infrastructure with Packer Ansible and Terraform
PDF
DevOps with GitHub Actions
PPTX
Cloud Computing: Virtualization
PPTX
Azure Cloud PPT
PDF
Sre summary
PDF
Introduction of Kubernetes - Trang Nguyen
PPTX
Quality attributes in software architecture
PPTX
Why to Cloud Native
PPTX
Container orchestration overview
PPTX
Azure kubernetes service (aks)
PDF
An Introduction to Software Architecture
PPTX
AWS Simple Storage Service (s3)
Introduction to Kubernetes
Microsoft Azure
Introduction to Azure monitor
Cloud computing intro
DevOps Powerpoint Presentation Slides
Google Firebase
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
Introduction to Cloud Computing
Immutable Infrastructure with Packer Ansible and Terraform
DevOps with GitHub Actions
Cloud Computing: Virtualization
Azure Cloud PPT
Sre summary
Introduction of Kubernetes - Trang Nguyen
Quality attributes in software architecture
Why to Cloud Native
Container orchestration overview
Azure kubernetes service (aks)
An Introduction to Software Architecture
AWS Simple Storage Service (s3)
Ad

Similar to Eventual consistency vs Strong consistency what is the difference (20)

PPTX
jjjjjjjjjjjjjjjjjjjjjjjjjjjjlecture 27.pptx
PPT
ds7_con.ppt
PPTX
Consistency in NoSQL
PPTX
Beyond Strong Consistency
PDF
DC_M5_L2_Data Centric Consistency (1).pdf
PPT
This is introduction to distributed systems for the revised curiculum
PPT
chen-06.ppt
PDF
Parallel and Distributed Computing Chapter 6
PDF
Reasoning about data and consistency in systems
PPTX
Ch-7-Part-2-Distributed-System.pptx
PDF
Eventual Consistency – Du musst keine Angst haben
PPT
Chapter 6-Consistency and Replication.ppt
PDF
NoSQL and Einstein's theory of relativity
PPTX
The dude's guide to database consistency
PPTX
Lost with data consistency
PDF
Eventual Consistency - JUG DA
PPTX
Storage Consistency for ECE536
PPTX
slides.07.pptx
PPT
Distributed System by Pratik Tambekar
PDF
Distributed Algorithms
jjjjjjjjjjjjjjjjjjjjjjjjjjjjlecture 27.pptx
ds7_con.ppt
Consistency in NoSQL
Beyond Strong Consistency
DC_M5_L2_Data Centric Consistency (1).pdf
This is introduction to distributed systems for the revised curiculum
chen-06.ppt
Parallel and Distributed Computing Chapter 6
Reasoning about data and consistency in systems
Ch-7-Part-2-Distributed-System.pptx
Eventual Consistency – Du musst keine Angst haben
Chapter 6-Consistency and Replication.ppt
NoSQL and Einstein's theory of relativity
The dude's guide to database consistency
Lost with data consistency
Eventual Consistency - JUG DA
Storage Consistency for ECE536
slides.07.pptx
Distributed System by Pratik Tambekar
Distributed Algorithms
Ad

More from jeetendra mandal (20)

PPTX
what is OSI model
PPTX
What is AWS Cloud Watch
PPTX
What is AWS Fargate
PPTX
Batch Processing vs Stream Processing Difference
PPTX
Difference between Database vs Data Warehouse vs Data Lake
PPTX
Difference between Client Polling vs Server Push vs Websocket vs Long Polling
PPTX
Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...
PPTX
Difference Program vs Process vs Thread
PPTX
Carrier Advice for a JAVA Developer How to Become a Java Programmer
PPTX
How to become a Software Tester Carrier Path for Software Quality Tester
PPTX
How to become a Software Engineer Carrier Path for Software Developer
PPTX
Events vs Notifications
PPTX
Event Driven Software Architecture Pattern
PPTX
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
PPTX
Observability vs APM vs Monitoring Comparison
PPTX
Disaster Recovery vs Data Backup what is the difference
PPTX
What is Spinnaker? Spinnaker tutorial
PPTX
Difference between Github vs Gitlab vs Bitbucket
PPTX
Difference between Git and Github
PPTX
Kubernates vs Openshift: What is the difference and comparison between Opensh...
what is OSI model
What is AWS Cloud Watch
What is AWS Fargate
Batch Processing vs Stream Processing Difference
Difference between Database vs Data Warehouse vs Data Lake
Difference between Client Polling vs Server Push vs Websocket vs Long Polling
Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...
Difference Program vs Process vs Thread
Carrier Advice for a JAVA Developer How to Become a Java Programmer
How to become a Software Tester Carrier Path for Software Quality Tester
How to become a Software Engineer Carrier Path for Software Developer
Events vs Notifications
Event Driven Software Architecture Pattern
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
Observability vs APM vs Monitoring Comparison
Disaster Recovery vs Data Backup what is the difference
What is Spinnaker? Spinnaker tutorial
Difference between Github vs Gitlab vs Bitbucket
Difference between Git and Github
Kubernates vs Openshift: What is the difference and comparison between Opensh...

Recently uploaded (20)

PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPT
Introduction Database Management System for Course Database
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
AI in Product Development-omnex systems
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Introduction to Artificial Intelligence
PPTX
ai tools demonstartion for schools and inter college
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Odoo Companies in India – Driving Business Transformation.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Design an Analysis of Algorithms I-SECS-1021-03
ManageIQ - Sprint 268 Review - Slide Deck
Introduction Database Management System for Course Database
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
AI in Product Development-omnex systems
Operating system designcfffgfgggggggvggggggggg
Introduction to Artificial Intelligence
ai tools demonstartion for schools and inter college
How to Choose the Right IT Partner for Your Business in Malaysia

Eventual consistency vs Strong consistency what is the difference

  • 2. Eventual Consistency vs Strong Consistency
  • 3. What is Eventual Consistency? Eventual consistency is a theoretical guarantee that, provided no new updates to an entity are made, all reads of the entity will eventually return the last updated value. The Internet Domain Name System (DNS) is a well-known example of a system with an eventual consistency model. DNS servers do not necessarily reflect the latest values but, rather, the values are cached and replicated across many directories over the Internet. It takes a certain amount of time to replicate modified values to all DNS clients and servers. However, the DNS system is a very successful system that has become one of the foundations of the Internet. It is highly available and has proven to be extremely scalable, enabling name lookups to over a hundred million devices across the entire Internet.
  • 4. What is Strong Consistency? In contrast, traditional relational databases have been designed based on the concept of strong consistency, also called immediate consistency. This means that data viewed immediately after an update will be consistent for all observers of the entity. To have strong consistency, developers must compromise on the scalability and performance of their application. Simply put, data has to be locked during the period of update or replication process to ensure that no other processes are updating the same data.
  • 5. Eventual Consistency Use case Eventual consistency is a consistency model that enables the data store to be highly available. It is also known as optimistic replication & is key to distributed systems •Think of a popular microblogging site deployed across the world in different geographical regions like Asia, America, and Europe. Moreover, each geographical region has multiple data center zones: North, East, West, and South. •The data store service is highly available. Even if a few nodes go down persistence service is still up. Let’s say a celebrity makes a post on the website that everybody starts liking around the world. •At a point in time, a user in Japan likes a post which increases the “Like” count of the post from say 100 to 101. At the same point in time, a user in America, in a different geographical zone, clicks on the post, and he sees “Like” count as 100, not 101.
  • 6. Eventual Consistency Use case Eventual consistency is a consistency model that enables the data store to be highly available. It is also known as optimistic replication & is key to distributed systems •Think of a popular microblogging site deployed across the world in different geographical regions like Asia, America, and Europe. Moreover, each geographical region has multiple data center zones: North, East, West, and South. •At a point in time, a user in Japan likes a post which increases the “Like” count of the post from say 100 to 101. At the same point in time, a user in America, in a different geographical zone, clicks on the post, and he sees “Like” count as 100, not 101. •the new updated value of the Post “Like” counter needs some time to move from Japan to America and update server nodes running there. Though the value of the counter at that point in time was 101, the user in America sees old inconsistent values. •But when he refreshes his web page after a few seconds “Like” counter value shows as 101. So, data was initially inconsistent but eventually got consistent across server nodes deployed around the world. This is what eventual consistency is.
  • 7. Strong Consistency Use case Strong Consistency simply means the data must be strongly consistent at all times. All the server nodes across the world should contain the same value as an entity at any point in time. • So, once a user in Japan updates the “Like” counter from 100 to 101. The value gets replicated globally across all nodes. Once all nodes reach consensus, locks get lifted. Now, other users can Like posts. • If the nodes take a while to reach a consensus, they must wait until then. Well, this is surely not desired in the case of social applications. But think of a stock market application where the users are seeing different prices of the same stock at one point in time and updating it concurrently. This would create chaos. Therefore, to avoid this confusion we need our systems to be Strongly Consistent • The nodes must be locked down for updates. Queuing all requests is one good way of making a system Strongly Consistent. The strong Consistency model hits the capability of the system to be Highly Available & perform concurrent updates.
  • 8. Eventual Consistency Whenever we use multiple replicas of a database to store data and let’s say a write request comes to one of the replicas. In such a situation, Databases had to discover a strategy to make this write request at one replica reach other replicas so that they all could also write data of the request and become consistent. Eventual consistency makes sure that data of each node of the database gets consistent eventually. Time taken by the nodes of the database to get consistent may or may not be defined. Data getting consistent eventually means it will take time for updates to reach other replicas. So what?This implies that if someone reads from a replica which is not updated yet (since replicas are updated eventually) then it may return stale data.
  • 9. Strong Consistency It says data will get passed on to all the replicas as soon as a write request comes to one of the replicas of the database. But during the time these replicas are being updated with new data, response to any subsequent read/write requests by any of the replicas will get delayed as all replicas are busy in keeping each other consistent. As soon as they become consistent, they start to take care of the requests that have come at their door.
  • 10. Eventual Consistency Eventual consistency guarantees that if an update is made to the data of a node (say node N), then the updated value will eventually be propagated to all the replicas of that node and eventually all the replica will become consistent to the original node(N). Nodes will get eventually consistent means it will take time for updates to reach other replicas. Hence eventual consistency is a consistency model used to achieve high availability and is a weak consistency model.
  • 11. Strong Consistency In contrast to eventual consistency, Strong consistency guarantee that if an update is made to a node (say N), then the updated value will be propagated to all the replicas(N1 & N2) of the node(N), immediately in other words after the update completes, any subsequent access (to N, N1, or N2) will always return the updated value. Note during the time these replicas are being updated with new data, any read/write request to any of these replicas will get delayed as all replicas are busy in keeping each other consistent and once they will become consistent with the original node they will start accepting read/write request again.
  • 12. Eventual Consistency An eventually consistent model guarantees that whenever an update is made at a node of a distributed system, it will eventually be replicated across all the nodes, as long as no new updates are made to the entity during this time. This makes the data at all the nodes consistent to the original node eventually. Eventually, all the clients will see the update. Here, the stress is on ‘eventual’, which means it can take some time before the updated value is synchronized across all the nodes.
  • 13. Strong Consistency In a strongly consistent system, all the replicas are updated with the most recent value as soon as any one of the replicas responds to a write request. However, during the time interval that the data is being updated in the replicas, all read/write requests made to any of the replicas will be delayed. The replicas will only respond to the request once all the nodes receive the update. In other words, the client will get a response for their request once all the nodes of the system are consistent.
  • 14. THANK YOU Like the Video and Subscribe the Channel