Where is the best place to aggregate data for UI in microservices architecture

I am creating an application using microservice architecture. It has five Rest APIs and one user interface (single page application).

enter image description here

Can anyone advise me what is the best option for data aggregation?

  • Make the UI app as a static web app and execute all API requests from the front end (from the browser using the javascript framework) and the whole data collection is done in the frontend and rendering itself?
  • Make the UI app as a dynamic web app and do all API request and data aggregation in the web app backend?
+3


source to share


1 answer


It looks like the pattern you are looking for is an API gateway . Sometimes also called "Edge" or "EdgeService". It can be used as a single entry point to your cluster and aggregate the results of a service call. Other use cases include centralized authentication and / or authorization, as well as routing, monitoring, and resiliency.

Some people only route external calls through the gateway, others also route internal calls through the gateway.

Here are some technologies to explore:



Zuul from the Netflix stack. You are writing a filter for aggregation. See this document.

Amazon API Gateway - If you are running AWS. You usually use your own lambda service for aggregation.

Kong . Doesn't have built-in support for aggregation, but you can redirect to a separate aggregation service that you provide.

+2


source







All Articles