Sobes.tech
Senior

Choreography or orchestration — which style did Saga use?

sobes.tech AI

Answer from AI

In the Saga pattern for managing distributed transactions, there are two main styles: orchestration and choreography.

  • Orchestration — a centralized controller (orchestrator) manages the sequence of saga steps, sends commands to services, and handles their responses. This simplifies control and debugging but creates a single point of failure.

  • Choreography — each service independently reacts to events and initiates the next saga step without a central controller. This is more decentralized and scalable but harder to track and debug.

The choice depends on the architecture and requirements of the project:

  • If strict control and easy monitoring are important, orchestration is chosen.
  • If high scalability and loose coupling are needed, choreography is preferred.

In Go projects, orchestration is often used with specialized libraries or custom controllers, but choreography is also popular when using event-driven systems (e.g., Kafka).

Choreography or orchestration — which style did Saga… - sobes.tech