medium.com 6 min read Original Source

You Probably Do Not Need the Saga Pattern

Last week I published a complete guide to distributed transactions. Two phase commit, Saga choreography, Saga orchestration, the transactional outbox. Working code, passing tests, all of it on GitHub. People have been reading it and that is great.

This article is about when you should ignore all of it.

Because here is the thing nobody says out loud in system design interviews: the best distributed transaction is the one you never have to run. And a remarkable number of teams running Sagas in production today created the problem they are now heroically solving.

How Teams End Up Here

The sequence is almost always the same. I have watched it happen and I suspect you have too.

A team builds a product. It works. It grows. Someone goes to a conference. The conference has fourteen talks about microservices and zero talks about keeping things simple, because “we kept things simple and nothing went wrong” does not fill a conference hall.

The team comes back and splits the system. Orders service. Payment service. Inventory service. Each with its own database, because that is the rule. Shared databases are a sin. The architecture diagram looks fantastic. It goes in a slide deck. Promotions follow.

Then someone tries to place an order.

The order needs to touch all three services. All three need to succeed together or fail together. Which is a transaction. Which the team can no longer do, because they took one database where this was a single ACID transaction and split it into three databases where it is a distributed systems research problem.

So now they need the Saga pattern. And compensation logic. And an outbox table. And idempotent consumers. And a way to debug a workflow that spans three services, three databases, and a message broker, at 2am, while the on-call engineer slowly questions every decision that led them to this career.

None of this was forced on them. They chose it. The transaction that now requires an orchestrator, a state machine, and a retry policy with exponential backoff used to be this:

BEGIN;
INSERT INTO orders ...;
UPDATE accounts SET balance = balance - 99 WHERE id = 1;
UPDATE inventory SET stock = stock - 1 WHERE product_id = 42;
COMMIT;
BEGIN;
INSERT INTO orders ...;
UPDATE accounts SET balance = balance - 99 WHERE id = 1;
UPDATE inventory SET stock = stock - 1 WHERE product_id = 42;
COMMIT;

Four lines. Atomic. Consistent. Boring. Beautiful.

The Numbers Behind the Hangover

This is not me being contrarian for sport. The industry data from the past two years tells a consistent story.

A CNCF survey found that 42% of organizations that adopted microservices are now consolidating services back into larger deployable units. Not because microservices do not work, but because the operational overhead was not worth it at their scale. Service mesh adoption fell from 18% to 8% over two years. The Prime Video team published a case study showing that consolidating one of their microservice workloads back into a monolith cut infrastructure costs by 90%, and the industry spent two years trying to explain why that case did not count.

The pattern across all of it: distributed complexity was adopted as a default rather than as a response to an actual problem. Companies paid Google-scale operational costs without having Google-scale problems. The 42% are not retreating. They are correcting.

What Sagas Actually Cost

The Saga pattern is a genuinely good solution to a genuinely hard problem. I implemented all of it in the previous article and I stand by every line. But the full bill rarely gets itemized, so let me do that here.

You lose atomicity and isolation. A Saga is a sequence of local transactions. Between steps, the system is in an intermediate state that other transactions can observe. Customer support sees an order that is paid but has no inventory reserved. A report runs mid-saga and counts revenue for an order that will be compensated away ten seconds later. With ACID transactions, intermediate states are invisible. With Sagas, they are a feature you have to design around.

Compensation is not rollback, and writing it is harder than the forward path. A rollback pretends nothing happened. A compensation has to actively undo something that did happen, and some things do not undo. You cannot un-send an email. You cannot un-notify a warehouse that started packing. Every step in your Saga needs a compensating action, and each compensating action needs its own failure handling, because yes, compensations can fail too, and now you are writing recovery logic for your recovery logic.

The dual write problem follows you everywhere. Updating your database and publishing an event are two operations on two systems, and they cannot be made atomic without the outbox pattern. So now you have an outbox table, a background publisher, at-least-once delivery, and therefore idempotent consumers with deduplication tables. Every service. Every event. Forever.

Debugging becomes archaeology. A failed Saga leaves a trail across multiple services, multiple databases, and a message broker. Reconstructing what happened to order 8472 means correlating logs across systems with clock skew. The orchestrator pattern helps because the state machine is in one place, but that just means you have built and now operate a workflow engine, which is its own job.

Testing multiplies. Happy path, plus every step failing, plus every compensation failing, plus duplicate event delivery at every step, plus events arriving out of order. The test matrix for a three-step Saga is larger than most teams’ entire test suite for the monolith they replaced.

Each item on this list is manageable. Together they are a tax on every feature you ship for the lifetime of the system. The question is never whether you can pay it. The question is whether you got anything for the money.

What You Get for One Database

PostgreSQL on decent hardware handles tens of thousands of transactions per second. A single ACID transaction across orders, payments, and inventory takes single-digit milliseconds. There is no compensation logic because there is nothing to compensate. There is no outbox because there is no event to lose. There is no eventual consistency because there is just consistency, available immediately, guaranteed by software that has been hardened for thirty years.

How far does this take you? Further than almost anyone admits. Shopify runs one of the largest commerce platforms on the planet on a modular monolith. Stack Overflow served the entire global developer population for years on a handful of servers. The boring answer scales until you are an outlier, and you will know with certainty when you become one, because the database will tell you, repeatedly, in your metrics.

What it will not do is impress anyone at a conference. There is no talk titled “We Used One Database and Went Home at 5pm”. There should be. I would attend.

The Modular Monolith Is Not a Compromise

The usual objection: “but we need module boundaries, separate teams, independent code ownership”. Correct. None of that requires a network.

A modular monolith gives you strict module boundaries, separate schemas per module if you want them, enforced interfaces between modules, and independent team ownership, all inside a single deployable unit with a single database. Spring Modulith exists for exactly this and will fail your build if module A reaches into module B’s internals. You get the architectural discipline of microservices without the distributed systems tax.

And the part that matters for this article: a transaction that spans modules is still just a transaction. The order module, payment module, and inventory module can all commit in one ACID operation because they share a database. The entire Saga problem evaporates. Not solved. Evaporated. There is nothing to solve.

If a module genuinely needs to be extracted later, real scaling pressure, a team that truly ships on a different cadence, a regulatory boundary, you extract that one module, and you adopt the Saga pattern for the one seam where you now actually need it. One seam. Not seventeen.

When You Genuinely Need Sagas

Being honest in both directions, because this is not a sermon against distributed systems. There are real cases:

The boundary already exists and you do not control it. Your payment processor is Stripe. Your shipping provider is external. You cannot ACID-commit across your database and someone else’s API. Sagas with compensation are the correct tool here, and notice that this case exists regardless of your internal architecture.

Genuinely independent scaling with evidence. Your ingestion pipeline does 100x the volume of your billing system and the numbers prove it. Different scaling profiles, different deployment cadence, measured and demonstrated. Extract it.

Organizational scale. Forty teams cannot share one deployment pipeline without trampling each other. At that size, service boundaries are team boundaries and the coordination cost of the monolith exceeds the operational cost of distribution. This is a real threshold. Most companies reading this are nowhere near it.

Regulatory isolation. Payment data that must live in a separately audited system. The boundary is imposed, not chosen.

The honest pattern that the industry has converged on: a modular monolith core with a small number of extracted services where the evidence demands it, and Sagas only at those seams. Start with the boring thing. Earn your complexity.

The Question to Ask Before Reaching for the Pattern

Next time someone in a design review proposes a Saga, ask one question: what is preventing this from being a single database transaction?

If the answer is an external system you do not control, fine. Saga away. My previous article has everything you need and the code is on GitHub.

If the answer is “because we split these services two years ago”, then you are not choosing the Saga pattern. You are paying interest on an architectural loan, and nobody is asking whether refinancing is an option. Consolidating two services back into one is not a failure. According to the CNCF, it is what 42% of the industry is quietly doing while the conference talks look the other way.

The distributed transactions guide I wrote is real and the patterns in it work. But the best engineers I know reach for those patterns the way a surgeon reaches for a scalpel. Deliberately, rarely, and never because the scalpel looked good on a slide.

The full distributed transactions guide with working code for 2PC, both Saga styles, and the outbox pattern:

Distributed Transactions in Microservices: 2PC, Saga Pattern, and the Transactional Outbox
Your payment service just charged a customer and also your inventory service went down as well. Neither of them knows…

GitHub – shan305/distributed-transactions: Distributed transaction patterns in Java : 2PC…
Distributed transaction patterns in Java : 2PC, choreography saga, orchestrator saga, and outbox pattern. …

Published under Systems Engineering.