Merging data on api gateway level or microservice level?

628 views Asked by At

I am using API gateway in order to make microservice resource publicly available.

I have the following situation (simplified as possible)

Microservice A - serve provides product prices on /product-prices/{id}

Microservice B - provides product availability on /product-availability/{id}

In order to get product price and availability I would either need to do the following

a) have Microservice A be dependent on Microservice B and have /product-prices-and-availability/{id} endpoint

or

b) have API gateway consume Microservice A and Microservice B in order to provide price end availability resource

Basically my question is should I merge data on microservice level or on api gateway level?

0

There are 0 answers