Saga Pattern Architecture Diagram: Choreography vs. Orchestration (2026)
How to create saga pattern architecture diagrams for distributed transactions in microservices. Covers choreography vs. orchestration, compensating transactions, Temporal, and AWS Step Functions — with AI prompt templates.
The saga pattern is a distributed transaction management technique for microservices architectures where each service has its own database and traditional ACID transactions that span services are not possible. A saga breaks a distributed transaction into a sequence of local transactions, each executed by a single service. If one step fails, compensating transactions undo the preceding steps to maintain data consistency. A saga pattern architecture diagram makes the transaction flow, failure paths, and compensation logic visible — which is critical for design reviews, on-call runbooks, and system design interview preparation.
This guide covers the two saga implementations (choreography and orchestration), how to diagram compensating transactions, and prompt templates for generating accurate saga diagrams with AI.
Why ACID transactions fail in microservices
In a monolith with a single shared database, a multi-step operation (reserve inventory → charge payment → create order → send confirmation) can be wrapped in a database transaction: if any step fails, everything rolls back atomically. In microservices, each service owns its own database — a payment service has its Stripe account and its own Postgres, an inventory service has its Redis and Postgres. There is no single transaction coordinator that spans all these resources. The saga pattern replaces the database transaction with a sequence of local transactions and explicit compensating actions.
Saga implementation 1: Choreography
In a choreography-based saga, there is no central coordinator. Each service listens for domain events published by other services and reacts by executing its local transaction and publishing its own event. The saga progresses through event chains.
Advantages: No single point of failure, loose coupling between services, easy to add new participants without changing existing ones.
Disadvantages: The overall transaction flow is implicit and distributed across multiple services — it's harder to debug, monitor, and reason about. Adding observability (distributed tracing across event chains) is required.
Saga implementation 2: Orchestration
In an orchestration-based saga, a central orchestrator service coordinates the transaction by calling each participant service in sequence (via commands) and deciding what to do based on each service's response. The orchestrator contains the entire saga logic in one place.
Advantages: The transaction flow is explicit and centralized — easy to understand, test, and debug. The saga state is visible in the orchestrator.
Disadvantages: The orchestrator is a new service that must be maintained and can become a bottleneck. Tight coupling between orchestrator and participants.
Compensating transactions: the rollback diagram
Each step in a saga must have a corresponding compensating transaction that undoes its effects. Unlike database rollbacks (which are atomic and automatic), compensating transactions are application-level operations that must be designed, implemented, and explicitly triggered. Show the compensation path as a separate flow on the diagram — usually a dashed or red arrow returning from the failure point back through previous steps.
Saga pattern: choreography vs. orchestration comparison
| Dimension | Choreography | Orchestration |
|---|---|---|
| Coupling | Event schema coupling only | Orchestrator coupled to all participants |
| Visibility | Distributed, implicit flow | Centralized, explicit flow |
| Debugging | Hard — requires distributed tracing | Easy — saga state in one place |
| Adding participants | Easy — subscribe to existing events | Requires orchestrator change |
| Compensation logic | Distributed across services | Centralized in orchestrator |
| Common tools | Kafka, RabbitMQ, EventBridge | Temporal, AWS Step Functions, Conductor |
Saga pattern with AWS Step Functions
What to annotate on a saga diagram
- Happy path vs. compensation path: Use distinct visual styles (solid lines for the normal flow, dashed red lines for compensation) — these are the two different behaviors the system exhibits and must be legible at a glance
- Idempotency guarantee: Annotate each step with whether it is idempotent — saga steps may be retried by the framework (Temporal, Step Functions), and non-idempotent operations (like charging a card) require deduplication logic
- Saga state persistence: Show where the saga execution state is stored (Temporal's event history, Step Functions execution state, or a saga_executions table in your database) — this determines durability on crash
- Timeout behavior: Label each step with its timeout and what happens on timeout — treat timeout as a failure that triggers the compensation path
- Which services participate: Number the steps in the saga flow (1, 2, 3...) and align them with the compensating actions in reverse order (3c, 2c, 1c) — this makes the rollback sequence explicit
Related guides: microservice architecture patterns, event sourcing and CQRS, Temporal workflow architecture, and Kafka architecture diagrams.
Ready to try it yourself?
Start Creating - Free