Crafting-Playground / Prototype

0 stars 0 forks source link

Define Interservice Communication #5

Open billkord opened 1 year ago

billkord commented 1 year ago

Investigation Results on Interservice Communication

Investigate below communication schemas:

Useful links

Microservices Architecture by Microsoft

billkord commented 1 year ago

Orchestrator

Synchronous architecture where the workflow is managed by the orchestrator service

Pros

Cons

Choreography

Asynchronous architecture where the workflow is operated by each service pushing and subscribing to message broker queues/topics

When To Use

When You need to tackle orchestrator bottlenecks. Also when you remove, or add new services frequently

This pattern is a natural model for the serverless architecture where all services can be short lived, or event driven. Services can spin up because of an event, do their task, and are removed when the task is finished.

Pros

Cons

Service-to-Service

Mostly synchronous communication between services.

In general it is considered a bad practice and should be avoided as much as possible. Of course this is not applicable as a service might needs to communicate directly to another one. The type of communication is separated in the following categories:

Useful links

  1. Detailed explanation about interservice communication here