The core answer is to stop chasing one global transaction and instead design each business operation around a consistency boundary you can actually enforce. In practice that means deciding, per data flow, whether you need strong consistency inside one service and its database, or whether an accepted form of eventual consistency across services is good enough. Then you back that decision with patterns like transactional outbox, saga orchestration, idempotent consumers, and reconciliation jobs. The key condition is that consistency is a business requirement before it is a technical one: a payment balance and a product review do not deserve the same guarantees, and treating them identically is how teams end up either over-engineering or silently losing money.

This playbook walks through the decisions in the order you'd actually make them, from classifying data to running the safety nets that catch what your patterns miss.

Start by classifying each data flow, not the whole system

Most consistency disasters begin with a vague statement like "we need our data to be consistent." That sentence can't be implemented. What can be implemented is a per-flow answer to three questions: which service owns each piece of data, what happens between the moment a write is accepted and the moment every reader sees it, and who pays if that window stays open too long.

A useful classification splits flows into three buckets.

Strongly consistent within a service. Anything the service can settle with a single local database transaction belongs here. Creating an order header and its line items in the same schema, enforcing a unique constraint on an email address, or atomically decrementing a locally held stock counter are all cases where you should just use the database you already have. A relational engine with ACID transactions handles this, and so does a document store that offers multi-document transactions. The mistake is distributing this logic across services when it doesn't need to be distributed.

Eventual consistency across services with a bounded delay. This covers the majority of cross-service flows: order placed but loyalty points not yet credited, user profile updated but the search index still stale, invoice generated but the accounting ledger updated a few seconds later. Here you're choosing an acceptable lag and a repair mechanism, not pretending the lag doesn't exist.

Invariantly critical cross-service values. These are the dangerous ones: an account balance, a seat inventory count, a coupon's remaining redemptions. You usually cannot tolerate even brief overselling or double-spend, yet the data genuinely spans services. These flows need either a designated owner that serializes the operation or a reservation protocol, discussed below.

Write the classification down. A one-page table listing flow, owning service, consistency class, acceptable staleness, and failure behavior is worth more than any framework choice, because it forces the business to state what "acceptable" means.

Decide the boundary: aggregate ownership and a single writer

The single most effective consistency technique in microservices is boring: make exactly one service the writer for each piece of data. When two services can both mutate the same record, no pattern will save you, because you've created a distributed write conflict that only coordination can resolve.

Domain-driven design gives you the vocabulary here. An aggregate is a cluster of data that must change together to remain valid, and each aggregate has one responsible service. If your order service and your fulfillment service both update order status, you don't have two services, you have one aggregate with two owners. Pick an owner, and make the other service request changes through an API or by consuming events rather than writing directly to shared tables.

This is where shared databases become a trap. A shared schema across services feels convenient early and guarantees inconsistency later, because you lose the ability to reason about who changed what and when. Direct cross-service database reads have a milder version of the same problem: they're fine for reporting and analytics, but if a service makes business decisions based on another service's tables, you've coupled them to a schema you don't control.

The practical test: for every table, can you name the single service that is allowed to write it? If the answer is "two" or "it depends," you have a boundary to fix before you choose any consistency pattern.

Handle the local case properly first

Before reaching for distributed patterns, make sure each service is internally consistent. A surprising share of "microservices consistency" problems are actually local bugs: a missing unique constraint, a read-modify-write that races, a cache that never expires.

Use database transactions for multi-row invariants. Enforce uniqueness in the database, not just in application code, because application checks race under concurrency. Use optimistic concurrency with a version column for records that are edited concurrently, and handle the conflict by retrying or by surfacing it to the user rather than silently overwriting. Set appropriate isolation levels and understand what yours actually guarantees: many databases default to read-committed, which prevents dirty reads but still allows non-repeatable reads, so a transaction that reads a value twice can see two different values.

Caching deserves its own discipline. A cache is a second copy of data, which means it's a second consistency problem. Use cache-aside with a short TTL for data that can be slightly stale, and invalidate on write when you can. If you cache something and never invalidate it, you've built a slow-motion inconsistency.

Only once single-service consistency is solid does it make sense to talk about coordinating across services.

Make cross-service writes reliable with the transactional outbox

The most common real failure in event-driven microservices isn't a logic error, it's the dual-write problem. A service writes an order to its database and then publishes an "order created" event to a broker. Those are two separate systems, and one can succeed while the other fails. If the database commit succeeds and the publish fails, downstream services never hear about the order. If the publish succeeds and the commit rolls back, downstream services act on an order that doesn't exist. Retrying the publish from application code doesn't fix this, because the process can crash between the two steps.

The transactional outbox solves it by making the event part of the same local transaction. You add an outbox table to the service's own database, and in the same transaction that writes the business data, you insert a row describing the event to publish. The business write and the outbox row commit or roll back together, so they can never disagree.

A separate relay then reads the outbox and publishes to the broker. That relay can be a polling process or a change-data-capture connector tailing the database log. Two details matter in practice. First, the relay must be able to publish the same event more than once, because it can crash after publishing but before marking the row as sent; that means consumers must be idempotent, covered in the next section. Second, the outbox table grows, so you need a retention policy that deletes rows after they're confirmed published and any audit window has passed.

To check success, stop a service mid-operation and confirm that either both the business row and the outbox row exist or neither does. Then kill the relay after a publish and confirm the message is redelivered rather than lost. The expected result is at-least-once delivery of every event, never loss and never a phantom event.

Make every consumer idempotent

Once you accept at-least-once delivery, idempotency stops being optional. An idempotent consumer produces the same final state whether it processes a message once or five times.

The standard approach is a deduplication record keyed by message ID, stored in the consumer's own database and written in the same transaction as the state change. If the ID is already present, the consumer skips the message. This works because the dedup insert and the business write commit together, so a crash mid-way leaves you either fully processed or fully unprocessed.

Where you can, prefer naturally idempotent operations. Setting a value ("status = shipped") is idempotent; incrementing a counter ("balance += 10") is not. For counters, model them as events with unique identities and derive the total, or store the processed message IDs alongside the counter. For payments, store an idempotency key from the client and reject or return the original result on a repeat.

One subtlety: deduplication records need a retention period at least as long as the maximum redelivery window. If you keep dedup IDs for an hour but the broker can redeliver after a day, you've reopened the door to duplicates.

Coordinate multi-step workflows with sagas, not distributed transactions

When a business operation genuinely spans several services and must compensate on failure, sagas are the usual answer. A saga is a sequence of local transactions, each in one service, paired with compensating actions that undo earlier steps if a later step fails.

There are two ways to run one. Orchestration uses a central coordinator that tells each service what to do and reacts to results. It's easier to reason about, easier to observe, and easier to debug, at the cost of a central component that must be reliable. Choreography has each service react to events and emit its own, with no central brain. It decouples services neatly but makes the overall flow hard to see as it grows, and it's easy to create accidental cycles.

A worked example makes the trade-off concrete. Consider placing an order that must reserve inventory, charge a payment, and create a shipment. In an orchestrated saga, the coordinator calls inventory-reserve, then payment-charge, then shipment-create. If payment fails, it calls inventory-release as compensation. If shipment fails after payment succeeded, it calls payment-refund and inventory-release. The compensations must themselves be idempotent and retriable, because the coordinator may retry them.

Sagas buy eventual consistency, not atomicity. There's a window where the order is placed, inventory is reserved, and payment is still pending. During that window, the outside world can see a partial state, so you need to design for it: show the order as "processing," and make sure a reservation that fails to complete expires rather than holding stock forever.

The specific stop condition: don't build a saga for a flow where a step is irreversible and financially material, such as an external bank transfer that cannot be reversed. Those flows need explicit reservation and confirmation steps, human review queues, or a different architecture entirely.

Reserve, then confirm, for scarce resources

For the invariantly critical flows you identified early, the reservation pattern often beats a naive saga. The idea is to separate the moment you claim a resource from the moment you finalize it.

An inventory service can hold stock in a "reserved" state with a timeout. The order service reserves, the payment service charges, and on success the reservation is confirmed; on failure or timeout it's released. The inventory service is the sole writer of the stock count, so it can serialize reservations locally, which means you never oversell even though the overall flow is distributed.

This same shape works for coupon redemption, seat selection, and account balance holds. The reserved state is a first-class part of your model, not an implementation detail, and it needs to appear in user-facing statuses so support staff can explain a pending order.

The failure mode to watch for is a reservation leak: a process dies after reserving and never confirms or releases. Timeouts plus a periodic sweep that releases expired reservations handle this. Track reservation age as a metric, because a growing tail of old pending reservations is the earliest sign that your saga is stuck.

Use read models to keep queries honest and fast

Consistency problems often show up as query problems. Teams join across service databases at read time, or have a reporting service poll many APIs, and the resulting numbers don't add up.

A read model, or a materialized view built from events, gives you a stable per-query view. The order service emits order events, and a query service consumes them and maintains a table shaped for the screens that need it. The read model is eventually consistent, and you acknowledge that in the UI by tracking a last-updated timestamp or by showing a "refreshing" state.

When a read model needs to combine data from several services, you're building a query-time join out of events, and you have to handle out-of-order arrival. Two events from different services don't have a natural ordering, so a read model that needs both should key on the business identifier and tolerate the second event arriving first. If you need strict ordering, partition the event stream by that identifier so related events land in the same partition and are processed in sequence.

Add reconciliation and observability as the safety net

No pattern eliminates inconsistency, so assume some will slip through and build detection. Reconciliation is the process of comparing two independent records of the same fact and fixing the difference.

Three recurring reconciliation checks earn their keep. Balance checks compare a derived total (sum of ledger entries) against a stored balance and flag mismatches. Completeness checks confirm that every business event in the source service has a corresponding downstream record, for example that every paid order has a shipment record or a recorded cancellation. Staleness checks measure the age of the oldest unconsumed event per subscriber and alert when it crosses the business's acceptable lag.

Observability makes all of this workable. Propagate a correlation ID across the whole flow so you can trace an order from creation through payment to shipment in one view. Emit metrics for outbox backlog, saga step success and failure rates, deduplication hit rates, and expired reservation counts. Log the business identifiers, not just request IDs, because when reconciliation finds a mismatch you need to find every message related to that order.

The success check for this section is simple: pick a random recent order and be able to list, from logs and metrics, every event it produced and every service that consumed each event, with timestamps.

Weigh the trade-offs and know when not to reach for microservices

Every consistency choice trades something. Strong coordination across services means lower availability during partitions and more latency per operation. Sagas mean complexity and compensating logic, and some steps are genuinely irreversible. Eventual consistency means users can see a partial state and your support team has to explain it, and it means your reconciliation jobs must exist and be monitored.

There's also the operational cost that doesn't show up in architecture diagrams: background jobs, dead-letter queues, replay tooling, and the human on-call knowledge to use them. A team that adopts sagas and outboxes without building that operational muscle tends to disable the compensations during incidents, which quietly converts eventual consistency into permanent inconsistency.

And it's worth saying plainly: if a domain needs strong consistency across most of its data, a single service with one database is often the better call. Modulith-style architectures with clear internal boundaries, or a small number of services each owning a coherent data set, avoid most of this problem entirely. Microservices are a fit for independently deployable teams with genuinely separable data ownership, not a default. Choosing when not to split is a consistency strategy in its own right.

Putting the pieces in order

A workable sequence for an existing system is to inventory and classify your data flows, fix any shared-write boundaries so each table has one owning service, add the transactional outbox to services that publish events, make consumers idempotent, then introduce sagas only for flows that truly need multi-step compensation. Finish by adding reconciliation checks and the metrics that tell you when lag or backlog is building. Each step is independently useful, and stopping halfway still leaves you more consistent than before.

For new work, start from the classification table and the aggregate boundaries, because they determine which of these patterns you'll need. The techniques above are mature and well-documented, but their value depends entirely on choosing the right consistency class for each flow, and that's a business decision your architecture has to serve.