Consistency Model in Distributed System
So, the real question isn't technical. It's: For this piece of data, what's the maximum time we can tolerate it being stale before it causes a real problem?
A user likes a photo. A friend across the world reloads their feed a second later, and the like count hasn't updated. Is this a bug? A user transfers $500. Their partner reloads the balance a second later, and it hasn't updated. Is this a bug? "No" to the first. A catastrophic "YES" to the second. Why?
The magic keyword is the Consistency Model. This isn't a technical choice; it's a business one. Engineers think data must always be perfectly up-to-date. This is expensive and often unnecessary. Your job is to ask the business: "What's the real cost of a user seeing data that is 5 seconds old?"
For a "like" count, the cost is near zero. Choosing Eventual Consistency makes the system faster and cheaper. A small delay is an acceptable trade-off for a better user experience.
For a bank balance, the cost of being wrong is catastrophic. You must use Strong Consistency. It's slower, but it guarantees correctness.
So, the real question isn't technical. It's: For this piece of data, what's the maximum time we can tolerate it being stale before it causes a real problem?


Thanks for this post! I really appreciate it.