Upstream and downstream services are fundamental components in a microservices-based architecture.
Upstream services refer to those that operate independently without relying on other services, allowing them to receive requests from or send responses to other services.
Conversely, downstream services are dependent on upstream services, making requests to or receiving responses from them.
While upstream services lack awareness of downstream services, the latter is cognizant of the existence of upstream services.
The application of upstream and downstream terminology can vary, depending on factors such as seniority or team preference, and can be conceptualized as a stream within a production process.
It is important to acknowledge that the definitions and terminology of upstream and downstream services are subject to interpretation and context.
Consequently, comprehending these concepts is vital for effectively designing and architecting microservices.
What are they?
Upstream services in a microservices based architecture are services that do not rely on any other services. They receive requests from or send responses to other services in the system. They can call downstream services, but they are not aware of the existence of these services.
On the other hand, downstream services are services that depend on the upstream services. They make requests to or receive responses from other services, including upstream services. They are aware of the existence of upstream services and consume or depend on them.
The terminology of upstream and downstream services can vary based on seniority or team preference, but their roles in the communication and interaction between microservices are crucial.
Interaction between services
The interaction between different components within a microservices-based system involves the exchange of requests and responses.
Upstream services, which do not depend on any other services, receive requests from or send responses to other services.
On the other hand, downstream services, which depend on upstream services, make requests to or receive responses from other services.
This interaction allows upstream services to call downstream services and vice versa.
It is important to note that upstream services are not aware of the existence of downstream services, while downstream services are aware of the existence of upstream services.
Additionally, upstream services can be consumed optionally by downstream services, while downstream services consume or depend on upstream services.
This interaction forms the foundation for communication and collaboration between microservices in a system.
Awareness and consumption
Awareness and consumption of services in a microservices-based system involves the recognition and utilization of available components within the architecture.
In this context, upstream services are not aware of the existence of downstream services, while downstream services are aware of the existence of upstream services.
Upstream services can be consumed optionally by downstream services, meaning that downstream services may or may not utilize the functionality provided by upstream services.
On the other hand, downstream services consume or depend on the services provided by upstream services.
This awareness and consumption relationship enables downstream services to leverage the functionalities and data offered by upstream services to fulfill their own requirements.
Ultimately, the awareness and consumption of services play a crucial role in facilitating communication and interaction between microservices in a microservices-based architecture.