Escolha entre coreografia e orquestração
Compare diretamente os dois estilos de saga e aprenda critérios concretos para escolher coreografia ou orquestração em um determinado fluxo de trabalho.
Escolha entre coreografia e orquestração é uma aula grátis de Microservices Communication Patterns (Saga, Circuit Breaker) no CoddyKit. Esta é a aula 4 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Microservices Communication Patterns (Saga, Circuit Breaker), e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Microservices Communication Patterns (Saga, Circuit Breaker) inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em inglês.
Two Ways to Run a Saga
You have met both saga styles. Now the practical question: which one should you use? The choice shapes coupling, visibility, and operability of your whole workflow.
Quick Refresher
Choreography: services react to each other's events, no central brain. Orchestration: a central orchestrator explicitly tells each service what to do next.
Coupling
Choreography couples services only to event contracts — very loose. Orchestration centralizes flow knowledge in the orchestrator, coupling services to it but freeing them from knowing about each other.
Visibility of the Flow
With orchestration the entire workflow lives in one place — easy to read, trace, and reason about. With choreography the flow is emergent, scattered across event handlers, and harder to follow.
Debugging and Monitoring
Tracing a failure is simpler in orchestration: the orchestrator logs each step. In choreography you must reconstruct the path from distributed event logs, which gets painful as steps grow.
Adding Steps Later
Adding a step in choreography can mean changing several services that emit/consume events. In orchestration you usually change only the orchestrator, leaving participants untouched.
Risk of Cyclic Dependencies
Choreography can drift into hard-to-spot event cycles where services trigger each other in loops. Orchestration's explicit flow makes such cycles obvious and avoidable.
Single Point of Failure
The orchestrator is a potential bottleneck and single point of failure (mitigated by making it stateless and replicated). Choreography has no such central component.
A Rule of Thumb
Practical guidance:
- Few steps, simple flow → choreography
- Many steps, complex branching, needs visibility → orchestration
Hybrid Approaches
Real systems often mix both: orchestrate the complex core workflow, while letting peripheral concerns (analytics, notifications) react to events choreographically. Pick per workflow, not per system.
Team and Org Factors
Conway's law applies: independent teams may prefer choreography to avoid a shared orchestrator. A platform team that owns the workflow may prefer the central control of orchestration.
Quick Check
Test your decision-making.
Recap
You can now choose a saga style:
- Choreography = loose coupling, emergent flow; orchestration = central control, clear visibility
- Orchestration eases debugging, adding steps, and avoiding cycles
- It introduces a central component to keep resilient
- Few simple steps favor choreography; many complex steps favor orchestration
- Hybrids are common — decide per workflow
Aprenda Microservices Communication Patterns (Saga, Circuit Breaker) com um tutor de IA — grátis
Escreva e execute código real no seu navegador, obtenha ajuda instantânea de um tutor de IA 24/7 e continue de onde parou na web ou no app.
- Cursos
- 12
- Aulas
- 48
Perguntas Frequentes
A aula “Escolha entre coreografia e orquestração” é grátis?
Sim — o texto completo de “Escolha entre coreografia e orquestração” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Microservices Communication Patterns (Saga, Circuit Breaker), atualize para CoddyKit PRO. O curso de Microservices Communication Patterns (Saga, Circuit Breaker) inclui 4 aulas no total.
O que vou aprender em “Escolha entre coreografia e orquestração”?
Compare diretamente os dois estilos de saga e aprenda critérios concretos para escolher coreografia ou orquestração em um determinado fluxo de trabalho. Você pratica Microservices Communication Patterns (Saga, Circuit Breaker) com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar Microservices Communication Patterns (Saga, Circuit Breaker)?
Nenhuma experiência prévia é necessária. Microservices Communication Patterns (Saga, Circuit Breaker) no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 4 de 4.
Quanto tempo leva a aula “Escolha entre coreografia e orquestração”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de Microservices Communication Patterns (Saga, Circuit Breaker)?
Sim. Cada aula de Microservices Communication Patterns (Saga, Circuit Breaker) inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- O que é o padrão Saga
- Saga por coreografia explicada
- Saga por orquestração explicada
- Escolha entre coreografia e orquestração