microservicesapi-gateway

What is Upstream and Downstream services in a microservices based architecture?


I have heard of the terms "Upstream Services" and "Downstream Services" in general terms but I came across some articles on microservices architecture where they have used these terms. I wasn't able to understand what an upstream and downstream service in a microservices based architecture would be? Can somebody give me a brief explanation?

I already know that upstream services are those that do not depend on any other services and downstream services depend on the upstream services. For example, the front-end would be a downstream service to the backend as it depends on it.

I am developing the microservices in .Net Core.


Solution

  • Definition 1: The direction of action

    Upstream: receiving requests from / sending responses to

    Downstream: making requests to / receiving responses from

    Definition 2: The direction of dependency

    Upstream: making requests to / receiving responses from

    Downstream: receiving requests from / sending responses to

    So,

    There are resources on the internet which support both of these definitions. Maybe we will resolve this question one day, but for now the answer is: it's either.