Return

Pattern: Communicate Through APIs

In a highly distributed system, microservices must communicate with one another via stable and strongly segregated APIs

Communicate Through APIs

A company is building a microservices application. Some teams work on a single microservice, others on multiple microservices. Teams are independent and aim to reduce inter team dependencies on both technical and organizational levels.

In This Context

If APIs among microservices are not well-defined and fully segregated, they will require tighter coupling in development and/or delivery. This in turn introduces dependency, both service-to-service and among teams on an organizational level.This process essentially undoes the move to decouple the monolithic app in the first place, as it leads to coordinated development for the delivery of multiple services and requires very tight collaboration across teams.This reduces the speed and agility of the organization and effectively re-creates the original monolithic architecture and organizational structure.

Therefore

Microservices should communicate with one another only through the network,using simple, consistent, and stable APIs.

Consequently

Microservices are kept decoupled and independent.