Communication in Services

Learn about service communication in distributed systems.

Let’s discuss the second mode of communication in distributed systems: communication via services.

Smaller services in one big system

In modern times, it’s a very common practice to design a distributed system in a granular form where many smaller systems form the entire system. These smaller systems are each responsible for one core task, and they do it as efficiently as possible. Each system generally has a database under the hood.

Press + to interact
Multiple services work together in a microservice architecture
Multiple services work together in a microservice architecture

As an example, Amazon will most likely have a system that handles orders, another system that deals with payments from users, and another one that takes care of users’ sessions. All these different smaller systems get stitched together to form the complete e-commerce backend of Amazon. Smaller systems like this are called services in the context of distributed systems. These services frequently have a bunch of APIs that they expose to their clients.

A service can have other services as its clients.

Breaking systems up into smaller components helps to maintain and scale various parts of the entire system in a more efficient and organized manner. Also, if one part of the system breaks, other parts can potentially continue to function due to the granular separation of responsibilities among many smaller systems. Modern systems tend to follow this pattern, popularly known as microservice architecture.

The opposite of the concept of ...