mercredi 19 janvier 2022

Microservices Architecture - API Gateway with Aggregator

I am trying to build a system which involves a client which will talk to a few microservices. I got to the point where I realize I don't want the client to communicate directly with all the microservices so an API Gateway sounds like the right choice.

The issue is with the API Composition, I came across 2 options that I am trying to understand.

  1. The API Gateway aggregator is quite understandable as it will query the microservices on its own and combine the result to return to the client. From what I understand it means that it has to have some of the logic of all microservices, is that correct? If so, is it a good approach?

  2. The API Gateway with the Aggregator pattern (separately). If I implement these 2 I will get something like this: API And Aggregator

From what I see it appears that the API Gateway will no longer do any routing since it has a bottleneck to that aggregator (which will do the requests to other services on its own). So I will get only Auth, Cache and load balancing from the API Gateway but the aggregator will do the routing as if he is the gateway?

Aucun commentaire:

Enregistrer un commentaire