Saga pattern (distributed transactions) template
An orchestrated saga: local transactions across services, the compensating steps that undo them, and orchestration vs choreography.
Use this templateFree, opens in your browser. No sign-up.
What's on the board
- Happy path: local transactions
- T1 Order service: create order (PENDING) · T2 Inventory: reserve stock · T3 Payment: charge card · T4 Shipping: book a courier · T5 Order service: mark APPROVED
- Compensating transactions (run in reverse on failure)
- C1 Cancel order (REJECTED) · C2 Release reserved stock · C3 Refund the charge
- Rules
- Compensations must be idempotent and retryable · Publish with the outbox pattern · After the pivot step (T4), only retry forward · Show PENDING states in the UI
Table columns: Aspect, Orchestration, Choreography.
Also on the board
- Order saga orchestrator: state machine, persisted after every step
How to use this template
- Click Use this template. It opens in the Kelvo app as a new board, saved in your browser.
- Double-click any box to change its text. Replace the examples with your own content.
- Sketch, then convert. Draw boxes and arrows with the pen, select the strokes and click Convert sketch: they become real boxes and links.
- Ask Kelvo right on the board (Pro). With Pro, type @kelvo and what you want in any box or text, for example “@kelvo add error handling”, and press Enter. The change is made there and the request disappears; ⌘Z undoes it.
- One page per level. Put the C4 context view on one page and the container view on the next, so each diagram stays readable.
Good for
- architect
- saga
- microservices
- distributed transactions
- patterns
- Agreeing on boundaries and responsibilities between services
- Recording why a design was chosen (and what was rejected)
- Comparing integration options side by side
Related templates
Backend for frontend (BFF)
One backend per client experience: web, mobile and partner APIs that aggregate shared services, with what each BFF owns.
Microservices with API gateway
Clients behind an API gateway, services that each own their database, and an event bus for asynchronous work.
Integration patterns compared
Request/response, queues, pub/sub and batch transfer side by side, with coupling, latency and when to use each.
Strangler fig migration
Replace a legacy monolith slice by slice behind a routing facade, in three phases, with a tracker for each slice.
LLM application architecture
Production building blocks around a model: gateway, guardrails, orchestrator, cache, vector DB, tools and observability.
Service mesh overview (Istio)
How a service mesh works: sidecar proxies beside every pod, mTLS between services, and a control plane pushing config and certs.