Menu

What Happens When Two Services Think They Own the Same Data?
📰

What Happens When Two Services Think They Own the Same Data?

DEV Community: microservices·Vikrant Bhalodia·4 days ago
#IIVauZ5u
Reading 0:00
15s threshold

The Problem Starts With Two Valid Updates

Imagine an e-commerce application with two services: Customer Service and Billing Service. Customer Service manages customer profiles, while Billing Service handles invoices and payment records. Both services store a customer's billing address because each needs that information to complete its work. At first, the design seems reasonable. Each service can access its own database without waiting for another service to respond.

Now imagine a customer changes their billing address. Customer Service updates its database immediately, but Billing Service still has the old address. A few minutes later, Billing Service generates an invoice using outdated information. Both services are functioning as designed, yet the business has produced an incorrect result. The underlying problem is that nobody clearly defined which service owns the authoritative billing address.

This kind of conflict appears frequently in distributed applications.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.