- rtshkmr's digital garden/
- References/
- Architecture Design Basics/
- Pattern Taxonomy/
- Communication & API Design/
- Choreography vs Orchestration/
Choreography vs Orchestration
Table of Contents
🔴 P0 — staff-level framing question: how do multi-service workflows coordinate?
Problem #
A business process spans multiple services (e.g. order: payment → inventory → shipping → notification). Who coordinates the steps?
Two Approaches #
Choreography (decentralised) #
Payment Service ──(event: "payment.completed")──→ Event Bus
↑ ↓
Inventory Service ←──(listens)───────────────────────┘
│
└──(event: "inventory.reserved")──→ Event Bus
↓
Shipping Service ←──(listens)Each service reacts to events and emits its own. No central coordinator. The “process” emerges from the interaction.
Orchestration (centralised) #
Order Orchestrator
│
├── 1. Call Payment Service
├── 2. Call Inventory Service
├── 3. Call Shipping Service
└── 4. Call Notification ServiceA central orchestrator drives the workflow, calling each service in sequence and handling failures.
Key Trade-offs #
| Dimension | Choreography | Orchestration |
|---|---|---|
| Coupling | Low (services only know events) | Higher (orchestrator knows all) |
| Visibility | Hard to trace full workflow | Easy (single process) |
| Failure handling | Distributed, complex rollback | Centralised, clearer rollback |
| Adding steps | Add a listener (low friction) | Modify orchestrator |
| Debugging | Requires distributed tracing | Linear call trace |
Instinct #
Choreography for simple, loosely-coupled event flows (2-3 services, order doesn’t matter much). Orchestration for complex business processes where ordering matters, compensating transactions are needed, and you need to see the full workflow in one place. For payment flows specifically (Stripe context), orchestration is usually the right call because failure handling and rollback logic must be explicit and auditable.
- INTERVIEW: This is a seniority-framing question. The right move in an interview is to name both options, state your instinct, and justify it:
For this payment flow, I’d use orchestration rather than choreography. The failure handling and rollback logic must be explicit and auditable — I want to see the full workflow in one place, not trace events across six services with distributed tracing.
References #
- Temporal: Workflow Engine Principles
- microservices.io: Saga Pattern — includes choreography vs orchestration
DDIA 2e Reference #
- Chapter 9: Ordering guarantees and their relationship to coordination
- Chapter 12: Data integration patterns