Loosely Coupling in Microservices Architecture

Mesut Yakut
3 min readDec 22, 2020

The concept of dependency, gained new meanings over time with the development and change of the software industry. In this article, we will examine the concept of dependency and effects in microservices architecture.

Communication is one of the important topics in microservices architecture. Designing communications between microservices is consist on separating concerns. How an api(service) communicates with another system or api depends on the threads it is responsible for. It should establish a synchronous communication if it needs to process data on the fly or if it needs to receive an instant response from another system.
Except for such compulsory situations, synchronous communication should be avoided and asynchronous communication should be established.

Why?

Technically, data transmission under load, error management, retry and rollback strategies are more difficult in synchronous communication than asynchronous communication.

If a service (api) communicates synchronously with another service or system, it is tightly coupled to that system or service. If it communicates asynchronously with another system or service, it is loosely coupled.
There are two type of communication dependency in microservice; tightly coupling and loosely coupling communication
Let’s examine closely why the type of dependency is important and effects under a few headings.

Development and Testability:

When microservices tightly coupled, during the development phase, it can be easily affected or affect another system. The development made must be made together in order not to disturb the existing order.
One of the most important part of software is testing processes. Tightly coupled microservices, they can be tested hard. There is always a problem of being affected by dependencies.
Conversely, loosely coupled microservices can be tested and develop more easily.Because of loosely coupled communication, systems can be more independent and unaffected.
This approach is a step towards making teams agile.

Continuous Delivery:

Speaking of the independence of loosely coupled microservices, we can see its greatest impact on the continuous delivery approach. Any time, any service, any rollback or any development can be deliver to customer because of loosely coupled and isolated microservices.
It is an another step towards making teams agile.

Scaling:

If we are working with microservices architecture, we are probably developing for a system that is large and under load. One of the most advantageous features of microservices architecture is that the part of system which is under load can be easily scaled. Scaling is very critical point for tightly coupled microservices, The systems which is services depend on, may not be able to handle this heavy load.
The situation is very different in loosely coupled systems. Scaling does not affect loosely coupled microservices and is not dependent on it.

Agility:

The organizational structure and functioning of software teams are related to the software products they are responsible for. The structure and architecture of the software system directly affects the behavior, performance of the team and its continuous delivery performance.
There are many parameters that affect the agility of a software development team. The above mentioned situations are the processes that affect the software development processes. Loosely coupled microservices increase team structure, stability, performance, and productivity.
Loosely coupled microservices play a critical role in faster decision making, implementation and team more agility.

As a conclusion, we have seen how the software life cycle can be intertwined with team structure in organizations working with microservices architecture.

Have fun.

--

--