Orchestration and Choreography

Orchestration reduces point-to-point communication between microservices where one service interact with other service. It is generally used to perform tasks in a sequence where centralized service acts as an orchestrator.

Common Problems with Orchestration

  • When multiple services are involved and one service is responsible for performing the tasks then it creates a web of communication paths which is hard to maintain, meaning changing or removing any of the service is not easy.
  • Results in tight coupling between the orchestrator and other involved microservices.
In Choreography, one service doesn’t directly interact with other services. All services observes the environment and acts on events, it’s event based communication instead of point-to-point or having centralized service responsible for all operations and communication.

Why to consider choreography over orchestration?

  • Easy to add new services for new functionality without impacting the existing logic.
  • Easy to remove or make changes in any of the connected services.
In Choreography, challenge comes with the distributed transaction can be handled using Saga and Compensating transaction pattern.
Please share this

Leave a Reply