Notesencoding🌱 seedling

Workflow Orchestration

Also: Orchestration · Orchestration vs Choreography · Workflow Engine

Workflow orchestration puts one component in charge of a multi-service process: it calls each step, tracks state, retries and compensates. Its alternative, choreography, lets services react to each other's events with no central owner.

Why it exists

A business process spanning several services needs someone to know where it is, what failed and what to undo. Either that knowledge is centralized (orchestration) or it is spread across the services (choreography).

How it works

  • Orchestration: a workflow (often durable) invokes services in order, records progress, retries with backoff and runs compensations if it gives up: the core of a saga.
  • Choreography: each service publishes events and subscribes to others' (Message Passing); the process is implicit in the subscriptions.
  • Engines differ in purpose: Temporal and AWS Step Functions coordinate business processes; Airflow-style schedulers run batch data pipelines as DAGs.
  • Execution semantics matter: Step Functions Standard workflows (up to a year) give exactly-once workflow execution; Express workflows (up to five minutes) run at least once when started asynchronously.

Trade-offs

Orchestration Choreography
visibility one place shows the whole process spread across services and logs
changing the flow edit one workflow coordinate changes in several services
coupling central dependency loose; services only share events
failure handling explicit retries and compensations each service handles its own

In practice

  • Netflix moved cloud-operation orchestration to Temporal workflows; deployments failing from transient errors dropped from about 4% to 0.0001% (2025).

Pitfalls

  • Choreography sprawl: nobody can say what the end-to-end process is.
  • The orchestrator as a god service that absorbs every team's business logic.

Recall

These cards are also in your review deck, scheduled with spaced repetition.