Eventual Consistency in Microservices and Large-Scale Distributed Systems
- Gourav Dhar
- Jan 16, 2023
- 3 min read
Updated: Feb 14, 2023
You can listen to the audio of this blog here

What is consistency?
Consistency is one of the most important aspects of system design. Consistency refers to the uniformity of the data presented to the user across all services and systems in a Distributed System.
Before moving on let me define a Distributed System
What is a Distributed System?
Imagine you have an application - for example an online product delivery app. All the operations in this application take place on a single server. As you get more orders, your server is unable to handle the load.
So now you decide to separate the operations of the system into multiple services. If required, you can scale up each service individually. This collection of multiple services that are part of a single application is called a distributed system.
Since the operations are distributed in different services/systems, we call them distributed systems. We call it large-scale distributed systems as it happens on a large scale.

These individual services are also called micro-services.
Now coming back to "What is consistency?"
Suppose in the above product delivery app, there are 2 services -
Service 1: Add/Edit/Delete items to the cart
Service 2: Fetch the cart details
For a user, he sees a single application, but for the application, all this work is divided among various services. Suppose the user adds a book to the shopping cart.
Service 1 goes and updates its database. It will also tell Service 2 to update its database and then it will return a success message to the user.
In this configuration, service 2 is aware of the changes made by the user. Hence it will always reflect the latest changes made by the user. Since there is uniformity in data across all services, we call this a consistent system. This type of consistency is called strong consistency as the system is consistent every time.
Now consider this -
Database write operations are time taking and in this process, the user had to wait for both service 1 and service 2 to update its database. You want your application to be faster. So you decide that as soon as Service 1 updates its database, you return a confirmation to the user. The update to the Server 2 will be an async background process.
This means that at the time the user got a confirmation, service 2 would still have given an incorrect result. Because of this, the system is not consistent. But there's a catch. Since this service has a background job to update the database of Service 2 eventually, we can say that such a system has eventual consistency.
Eventual consistency is a type of database that is not consistent, but reliable. It guarantees that the data will eventually be in the same state. This means that it may take time for the data to synchronize, but it will eventually happen.
In eventual consistency, the system guarantees that the latest write to any object will be eventually reflected in all copies of it, but it might take some time.
Eventual consistency is not suitable for applications that require strict ordering of events and need to maintain data integrity. It can also lead to a lot of trouble when you are trying to build a system with many replicas.
This is one of my favourite comic strips that explains eventual consistency

And that's a wrap! Hi, I am Gourav Dhar, a software developer and I write blogs on Backend Development and System Design. Subscribe to my Newsletter and learn something new every week - https://thegeekyminds.com/subscribe





_edited.png)










































































Grant Pharmacy makes it easy to order nitazoxanide online with trusted service and quick delivery.
Erome is a growing hub for creators to share and explore unique content. Find out how to join, navigate, and maximize your Erome experience.
One feature that makes reading stories even more enjoyable is the interactive elements such as quizzes, challenges, and achievements. These features add a layer of fun and motivation, making me feel like I’m actively engaging with the material rather than passively consuming it. Whether I’m answering quiz questions that test my comprehension or completing challenges that push me to read more, these interactive moments keep me invested in the process. It’s motivating to earn badges or unlock new levels, which makes me feel accomplished as I continue progressing.
top sex stories websites:
Assamese Sex Story
Punjabi Sex Story
Tamil Sex Story
Marathi Sex Story
Odia Sex Story
Nepali Sex Story
Marathi Sex stories
Odia Sex stories
The Keralalotteries program is one of the most trusted lottery systems in India. It has a long history of transparency and fair draws. I enjoy checking the results daily, especially for bumper draws like Onam and Vishu. It’s exciting to see if luck favors you.
Wow, what a game-changer! That win hit like a thunderbolt—fast, exciting, and incredibly rewarding. You played like a seasoned pro: sharp focus, steady spins, and just the right timing to unlock Ok Win Gift Code Today Ok Win Invite Code Ok Win Game Login OkWin Invite Code OkWin Login Okwin Game okwin lottery Okwin Game Login Okwin Register Okwin Prediction Ok Win App Download Ok Win Download okwin game login okwin gift code Okwin something amazing. It’s not every day a player gets a hit that huge, and you totally deserved it. Big wins like this make everything worthwhile. The energy from that moment is electric—hope you took a screenshot, because that’s a memory you’ll want to keep! Celebrate big…