Saga Orchestration diagram template

A coordinator drives a multi-service workflow with compensating actions on failure.

Saga Orchestration architecture diagramOpen in ArchBoard

Builds a new scene in your browser. Your existing scenes are not touched.

About this design

A saga replaces a distributed transaction with a sequence of local ones, each followed by a compensating action if a later step fails. In the orchestrated style shown here, a central coordinator holds the workflow's state and tells each participant what to do next: reserve stock, charge the card, create the shipment. If charging fails, the coordinator instructs inventory to release the reservation rather than rolling anything back magically. The workflow state is persisted so the saga can resume after a crash. Compared with choreography, where services react to each other's events, orchestration makes the flow easy to read and monitor, at the cost of a coordinator that must be built and kept reliable. Use the template to discuss idempotent steps, timeouts, human intervention for stuck sagas, and visualising in-flight workflows for support teams.

Diagram as text

This is the source of the diagram, in the ArchBoard diagram DSL. Paste it into Tools, Diagram from text to rebuild or change it.

title "Saga orchestration"
direction LR
client "Client" -> service orch "Saga orchestrator" -> db postgres "Saga state"
orch -> microservice inv "Inventory"
orch -> microservice pay "Payments"
orch -> microservice ship "Shipping"
inv -[compensate]-> orch
pay -[compensate]-> orch

Related guides

More messaging and events templates