Currently, we have an API endpoint (microservice called supplier service) like this: /suppliers/{supplierNumber}
, which will return a single supplier information.
In the UI, there is a screen to display a list of suppliers for different products. It looks something like this:
product1 -> supplier1
product2 -> supplier2
product3 -> supplier3
To display suppliers for a list of products, we need a for loop which calls the end point on each iteration.
My concern is that this is inefficient from a performance stand point. Why is it not possible to design an endpoint that takes in a list of supplier numbers and returns a list of supplier information?
Other people have said that it's not microservice design, and I'm not sure why it's not a proper design. Does anyone know the reasoning behind this?