liveBook · Manning

Data inconsistency

As explained in Microservices Patterns, Second Edition

A condition in which representations of related data differ across services or components that should agree.

Data inconsistency occurs when related data does not agree across services or components. In a fine-grained architecture, complex requests spanning services can produce subtle inconsistencies that are difficult to diagnose. Requests updating data in multiple services must use the Saga pattern to maintain consistency. section 2.2.4

Examples of inconsistencies include:

  • An order is not delivered because the application fails to assign a courier. section 2.2.4
  • A customer cancels an order immediately after placing it, but the application fails to issue a refund. section 2.2.4

Excessively complex sagas can obscure bugs, while interactions between services make diagnosis and repair difficult. section 2.2.4

How Microservices Patterns, Second Edition covers it

How deep it goes
Traces bugs to complex cross-service interactions and notes Saga use, but does not detail the Saga pattern.
Examples
Uses unassigned couriers and missing refunds after immediate order cancellations as inconsistent outcomes.
What you can do after
Understand how complex cross-service interactions can produce hard-to-diagnose inconsistencies.
How it connects
Links data inconsistency to microservices, cross-service requests, and the Saga pattern.

Also explained in

Compare how 2 books explain data inconsistency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.