Most of you have probably heard of the Saga pattern in microservice architectures. It helps coordinate a business process that spans multiple services and cannot be handled by a single transaction.
Each participant in a Saga commits a local change. If a later step fails, the system runs compensating actions to bring the process back to an acceptable state. But who should manage the sequence of steps: the services themselves, or a dedicated coordinator?
Orchestration or choreography?
With choreography, services react to one another’s events, and there is no central coordinator. With orchestration, a dedicated coordinator defines the order of actions, tracks the process state, and decides what to do when something fails.
The choice depends on the complexity of the business process and the level of control it requires. Let’s compare both approaches using the same example.
Example: placing an order
Choreography: services react to events
Consider an order workflow.…