Workflow management – orchestration versus choreography

In a distributed architectures (like microservices or event-driven architecture) sometimes a client request requires information from more than one service and this is called workflow management. There are primarly two types: orchestration and choreography.

Orchestration

Orchestration means that there is one service (conductor) which takes care of the workflow process.

Pros of Orchestration

  • Error handling is easy
  • Easy to understand – centralized workflow
  • Easy workflow state management
  • Easy to change workflow steps

Cons of Orchestration

  • Performance – a lot of round trips
  • Tight couping between orchestrator and orchestra
  • If orchestractor goes down, nothing can work anymore (availability)

Choreography

Choreography means that services (dancers) know exactly what to do – no managing service (conductor) needed.

Pros of Choreography

  • Responsivness and performance – no bottlenecks
  • Loose coupling (at least not as tight as for Orchestrator)

Cons of Choreography

  • Difficult error handling due to distributed workflow
  • Difficult state management due to distributed workflow
  • Difficult recoverability due to distributed workflow

Pozostaw komentarz

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są oznaczone *