Data Flow & Messaginghigh

Choreography vs Orchestration

Choreography: services react to events autonomously — no central controller. Orchestration: a central orchestrator explicitly directs each step of a workflow.

Memory anchor

Choreography = a jazz jam session (everyone improvises, no conductor). Orchestration = a symphony orchestra (the conductor tells each section exactly when to play).

Expected depth

Choreography is decentralized and resilient — no single point of failure for workflow coordination. But debugging a failed business process requires tracing events across multiple services, and adding a new step requires modifying the event contracts of existing services. Orchestration provides explicit visibility into workflow state, easier error handling and compensation, and simpler debugging — but the orchestrator is a coupling point and can become a bottleneck or single point of failure. Choreography suits simple pipelines; orchestration suits complex, long-running business processes with compensating logic.

Deep — senior internals

The choice has team topology implications: choreography distributes knowledge of the overall process across teams (each team knows its piece but no team has the full picture), while orchestration centralizes it (the team owning the orchestrator must understand the entire flow). In practice, many systems use a hybrid: orchestration within a bounded context (where a single team has full context) and choreography between bounded contexts (preserving team autonomy). Temporal.io and AWS Step Functions are orchestration engines that solve the durability problem: orchestrator state is persisted so it survives crashes without the developer implementing state machines manually.

🎤Interview-ready answer

For the order fulfillment flow in an e-commerce platform, I use orchestration within the order bounded context (one orchestrator manages: reserve inventory → charge payment → confirm order) because error handling and visibility matter, and it's one team's domain. Between bounded contexts (order confirmed → notify warehouse → trigger shipping), I use choreography via domain events so the warehouse team can evolve their consumer independently of order logic.

Common trap

Implementing choreography without a way to observe the overall process state. 'Where is order #12345 in the process?' becomes impossible to answer quickly without a dedicated process monitoring projection that subscribes to all relevant events.

Related concepts