QA
Senior LevelSystem Design & Architecture

Compare Saga Orchestration versus Saga Choreography for complex distributed workflows.

❓ Interview Prompt: Compare Saga Choreography (event-driven, decentralized, high coupling risk) vs Saga Orchestration (centralized orchestrator, explicit state machine).

Evaluating Saga implementation paradigms:

| Feature | Saga Choreography | Saga Orchestration |

|---|---|---|

| Control | Decentralized; microservices listen & emit events | Centralized Saga Orchestration State Machine |

| Coupling | Services must know events of other services | Services only know the central Orchestrator |

| Visibility | Difficult to trace complex 10+ step workflows | Centralized state machine provides 100% workflow visibility |

| Ideal For | Simple 2-3 step microservice workflows | Complex enterprise multi-step business transactions |

Code Implementation Example

typescript
// Saga Orchestrator State Machine (Temporal / AWS Step Functions)
export async function paymentWorkflowOrchestrator(ctx: WorkflowContext) {
  await ctx.executeStep('reserveInventory');
  await ctx.executeStep('processPayment');
  await ctx.executeStep('shipOrder');
}
πŸ’‘Defining a centralized Saga Orchestrator workflow.
🎯 Interview Key Takeaway

Use Saga Choreography for simple 2-step event flows, and Saga Orchestration for complex multi-step business workflows.

#System Design#Saga Orchestration#Saga Choreography#Microservices#Senior
Back to all System Design & Architecture Questions→

More System Design & Architecture Interview Questions

Beginner LevelSystem Design & Architecture

Explain the CAP Theorem and PACELC Theorem with real-world database examples.

Beginner LevelSystem Design & Architecture

What is Vertical Scaling (Scale Up) vs Horizontal Scaling (Scale Out)?

Beginner LevelSystem Design & Architecture

How do Load Balancers distribute traffic (Round Robin, Least Connections, IP Hash)?