Skip to main content
Aggregator Microservices

Intent

The user makes a single call to the aggregator service, and the aggregator then calls each relevant microservice.

Explanation

Real world example

Our web marketplace needs information about products and their current inventory. It makes a call to an aggregator
service which in turn calls the product information microservice and product inventory microservice returning the
combined information.


iluwatarAbout 1 minArchitecturalCloud distributedDecouplingMicroservices
API Gateway

Intent

Aggregate calls to microservices in a single location, the API Gateway. The user makes a single call
to the API Gateway, and the API Gateway then calls each relevant microservice.

Explanation

With the Microservices pattern, a client may need data from multiple different microservices. If the
client called each microservice directly, that could contribute to longer load times, since the
client would have to make a network request for each microservice called. Moreover, having the
client call each microservice directly ties the client to that microservice - if the internal
implementations of the microservices change (for example, if two microservices are combined sometime
in the future) or if the location (host and port) of a microservice changes, then every client that
makes use of those microservices must be updated.


iluwatarAbout 2 minArchitecturalCloud distributedDecouplingMicroservices
Fan-Out/Fan-In

Intent

The pattern is used when a source system needs to run one or more long-running processes that will fetch some data.
The source will not block itself waiting for the reply.
The pattern will run the same function in multiple
services or machines to fetch the data. This is equivalent to invoking the function multiple times on different chunks of data.


iluwatarAbout 2 minIntegrationMicroservices
Version Number

Name / classification

Version Number.

Also known as

Entity Versioning, Optimistic Locking.

Intent

Resolve concurrency conflicts when multiple clients are trying to update same entity simultaneously.

Explanation

Real world example

Alice and Bob are working on the book, which stored in the database. Our heroes are making
changes simultaneously, and we need some mechanism to prevent them from overwriting each other.


iluwatarAbout 2 minConcurrencyData accessMicroservices