Microservices Communication Patterns (Saga, Circuit Breaker) · Leçon

Choisir entre chorégraphie et orchestration

Comparez directement les deux styles de saga et apprenez des critères concrets pour choisir la chorégraphie ou l’orchestration selon le flux de travail concerné.

Leçon 4 sur 413 étapes

Choisir entre chorégraphie et orchestration est une leçon Microservices Communication Patterns (Saga, Circuit Breaker) gratuite sur CoddyKit. Ceci est la leçon 4 sur 4. Tu peux lire la leçon complète ci-dessous gratuitement — puis la pratiquer en direct dans le navigateur avec un éditeur de code intégré et un tuteur IA 24/7. Elle fait partie du parcours d'apprentissage Microservices Communication Patterns (Saga, Circuit Breaker), et ta progression se synchronise sur le web et l'application CoddyKit. Le cours Microservices Communication Patterns (Saga, Circuit Breaker) comprend 4 leçons au total.

Certaines parties de cette leçon n'ont pas encore été traduites et s'affichent en anglais.

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
Gratuit pour commencer

Apprends Microservices Communication Patterns (Saga, Circuit Breaker) avec un tuteur IA — gratuit

Écris et exécute du vrai code dans ton navigateur, obtiens de l'aide instantanée d'un tuteur IA disponible 24h/24, et reprends là où tu t'es arrêté sur le web ou dans l'app.

Cours
12
Leçons
48

Questions Fréquemment Posées

La leçon « Choisir entre chorégraphie et orchestration » est-elle gratuite ?

Oui — le texte complet de « Choisir entre chorégraphie et orchestration » est gratuit à lire ici sur le web. Pour la pratiquer de manière interactive (un éditeur de code intégré et un tuteur IA 24/7) et déverrouiller le reste du cours Microservices Communication Patterns (Saga, Circuit Breaker), passe à CoddyKit PRO. Le cours Microservices Communication Patterns (Saga, Circuit Breaker) comprend 4 leçons au total.

Qu'est-ce que j'apprendrai dans « Choisir entre chorégraphie et orchestration » ?

Comparez directement les deux styles de saga et apprenez des critères concrets pour choisir la chorégraphie ou l’orchestration selon le flux de travail concerné. Tu pratiques Microservices Communication Patterns (Saga, Circuit Breaker) avec du code pratique que tu exécutes directement dans le navigateur, et un tuteur IA 24/7 répond à tes questions au fur et à mesure que tu avances dans la leçon.

Dois-je avoir de l'expérience pour commencer Microservices Communication Patterns (Saga, Circuit Breaker) ?

Aucune expérience préalable n'est requise. Microservices Communication Patterns (Saga, Circuit Breaker) sur CoddyKit est structuré pour les débutants jusqu'aux apprenants avancés, donc tu peux commencer ici ou depuis le début et avancer à ton rythme. Ceci est la leçon 4 sur 4.

Combien de temps prend la leçon « Choisir entre chorégraphie et orchestration » ?

La plupart des leçons CoddyKit prennent environ 5–10 minutes. Chacune est courte et interactive, tu progresses régulièrement et tu repiques exactement où tu t'es arrêté sur le web et l'app.

Peux-tu écrire et exécuter du code dans cette leçon Microservices Communication Patterns (Saga, Circuit Breaker) ?

Oui. Chaque leçon Microservices Communication Patterns (Saga, Circuit Breaker) inclut un éditeur de code intégré, tu écris et exécutes du vrai code directement dans ton navigateur et tu reçois des retours IA instantanés — aucune configuration locale requise.

Toutes les leçons de ce cours

  1. Qu’est-ce que le modèle Saga ?
  2. La saga par chorégraphie expliquée
  3. La saga par orchestration expliquée
  4. Choisir entre chorégraphie et orchestration
← Retour à Microservices Communication Patterns (Saga, Circuit Breaker)