All templates

Saga Pattern Architecture Diagram Template

Diagram a saga pattern for distributed transactions — orchestrator, forward steps, and a compensation path.

Use this template

What you get

  • Orchestrator drives the forward chain of local transactions
  • Compensation row reverses committed steps on failure
  • Dashed failure edges and reverse-order rollback

What this template is for

A saga pattern architecture diagram shows how a long-running distributed transaction is composed of local transactions in multiple services, with compensations to undo earlier steps if a later one fails. This template lays out the canonical orchestrated saga: an orchestrator coordinates a forward path (order → payment → inventory → shipping), and a compensation path reverses any committed steps when a downstream failure happens (release inventory → refund → cancel order). Use it to design a distributed transaction, document the rollback semantics, or explain why ACID can't span microservices and why saga is the answer.

When to use this template

  • Design a distributed transaction spanning multiple microservices.
  • Explain why a single ACID transaction can't span services.
  • Document the compensation actions for each step in your saga.
  • Plan retry vs compensation policies for transient failures.
  • Trace where a saga got stuck — between which two steps.
  • Compare orchestrated saga against choreographed (event-driven) saga.

How to use it

  1. 1Start with the orchestrator at the top — it drives the saga.
  2. 2Draw the forward path as a horizontal chain of local transactions.
  3. 3Add a Done node at the end of the forward path for the happy outcome.
  4. 4Draw the compensation row below — one compensation per forward step (except the last).
  5. 5Connect each forward step down to its compensation with a dashed 'on failure' arrow.
  6. 6Chain compensations right-to-left to show rollback order.

Quick example

Order saga

Orchestrator → Order Service (create order)
Order → Payment Service (charge customer)
Payment → Inventory Service (reserve stock)
Inventory → Shipping Service (book carrier) → Done
On failure at step N: run compensation N-1, N-2, ..., 1

Start editing online

Open the template in CodePic, replace the sample nodes, and turn it into your own study board in a few minutes.

See examples: /templates/saga-pattern-architecture/examples

More templates you might like