Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Upstream and Downstream services in a Micro-service based architecture?

I have heard of the terms "Upstream Services" and "Downstream Services" in general terms but i came across some articles on micro-service architecture where they have used these terms , however i wasn't able to get what an upstream and downstream service in a micro-service based architecture would be ? does someone has a brief explanation ?

I already know that Upstream services are those that do not depend on any other services and downstream services depending on the upstream services for example the front end would be a downstream service to the back end as it depends on it.

I am developing the micro-services in .Net Core.

like image 273
Shubham Tiwari Avatar asked Oct 30 '19 11:10

Shubham Tiwari


People also ask

What is the meaning of upstream and downstream?

Stream – The moving water in a river is called a stream. Upstream – If the boat is flowing in the opposite direction to the stream, it is called upstream. In this case, the net speed of the boat is called the upstream speed. Downstream – If the boat is flowing along the direction of the stream, it is called downstream.

What is upstream and downstream in API gateway?

Upstream Versus Downstream In the same way that a raw material provider is “upstream” or “up river” from a factory, a raw data provider is “upstream” from the API that processes it. Similarly, the API which takes the output of another component's processing is considered “downstream” or “down river”.

What's a downstream service?

The downstream services are the ones that consume the upstream service. In particular, they depend on the upstream service. More generally, upstream services don't need to know or care about the existence of downstream services.

What are downstream and upstream applications?

downstream in the context of systems. In the case of upstream, we are looking at the application sending the data to another application. On the other hand, in the case of a downstream system, we are seeing that data flow in a different direction. In the case of downstream, we receive data.


4 Answers

Definition 1: The direction of action

Upstream: receiving requests from / sending responses to

  • A service upstream is calling me.

Downstream: making requests to / receiving responses from

  • I am calling a service downstream.

Definition 2: The direction of dependency

Upstream: making requests to / receiving responses from

  • I am calling a service upstream.

Downstream: receiving requests from / sending responses to

  • A service downstream is calling me.

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.

like image 143
tom redfern Avatar answered Oct 19 '22 20:10

tom redfern


The downstream services are the ones that consume the upstream service. In particular, they depend on the upstream service. More generally, upstream services don't need to know or care about the existence of downstream services. Downstream services care about the existence of upstream services, even if they only optionally consume them.

http://reflectoring.io/upstream-downstream

like image 37
Ashish Pani Avatar answered Oct 19 '22 19:10

Ashish Pani


I see it is a metaphor of water flow: the origin of a river is upstream, the outlet is downstream.

But in practice it is gibberish. Nowadays services exchange data through different means. A service can call another service to fetch data, it can also call the other service to push data. A service can receive data from another service by calls out first or it can receive data passively, like receiving push notification.

At work, you can use it judiciously: if someone who's more senior than your calls a service upstream service, go with it; if you are the most senior one on the team, name whatever you like.

like image 13
Shijing Lv Avatar answered Oct 19 '22 18:10

Shijing Lv


Upstream and Downstream in a Production Process enter image description here

Upstream and Downstream Software Dependencies enter image description here

Source

A picture is worth a thousand words !!

like image 7
Tom Taylor Avatar answered Oct 19 '22 20:10

Tom Taylor