Microservices is an eventual consistency trap

Maybe someone mentioned it but it certainly wasn’t part of the sales brochure

Aphinya Dechalert
4 min readMar 22, 2024
Image from Unsplash

We’ve been told it’s a thing of beauty — lean services, clear boundaries, promises of fast updates everywhere. So you sign your team up, make your own concoction, and prepare to unleash your microservice masterpiece on the world.

But there’s a catch no sales pitch or AWS conference ever warned you about.

And it’s called eventual consistency.

The Eventual Consistency Challenge

Eventual consistency, in plain English, means your data across all those lovely microservices won’t always be perfectly in sync. Updates can take time to ripple through the system. Think of it like sending a text message — it might be delivered instantly, or there might be a frustrating delay.

A user updates their shipping address within their profile service. If the order processing service still holds stale address data, it might lead to a package being shipped to the wrong location. This inconsistency directly impacts user experience and trust.

To prevent these user experience issues, we have to build in logic to handle potential data discrepancies. You might need to implement retries…

--

--