Microservice Orchestration vs Choreography

As we start developing microservices, sooner or later we see services start interacting with each other due to the complex nature of the business transaction.

This interaction style can be categorized as Orchestration or Choreography.

Orchestration:

The orchestration is the automated arrangement, coordination, and management of the computer system, middleware, and services. These services, middleware, and the computer system know who can perform a given task.

If services are aware to whom they should delegate the task for fulfillment then that can be described as service orchestration.

Orchestration

As in the above image, user service is aware of search and email service for searching and sending an email.

Choreography:

Service choreography is a form of service composition in which the interaction protocol between several partners is defined from a global perspective.

If services are not aware to whom they should delegate the task and services on other end subscribes only to events in which they are interested then it is known as service choreography.

choreography

As in the above image, user service is only aware of the golobal bus to notify others.