A separate orchestration service acts as the system command’s entry point and invokes saga participants synchronously or asynchronously. It can implement sagas for a domain. section 10.2.3
Choose between a separate service and embedding the orchestrator in a participant:
- Separate the orchestrator to simplify participants and reduce their design-time coupling, accepting another service and greater runtime coupling. section 10.2.3
- Embed it to reduce service count and sometimes runtime coupling, accepting extra responsibility and possible design-time coupling in the entry-point participant. section 10.2.3
With HTTP request/response, the orchestrator persists saga state and retries after communication failures. Participant endpoints can use idempotency keys to detect duplicate requests and resend the original response. section 10.2.5
Figure 10.11 There are two possible locations for a saga orchestrator. The first option is to have a separate orchestration service. The second option is to embed the orchestrator in one of the participants. Each option makes different trade-offs that affect design-time coupling, runtime coupling, and architectural complexity.
Compare the separate-service and embedded-participant placements and their coupling and complexity trade-offs. section 10.2.3
