DEV Community

Ananya
Ananya

Posted on

End-to-end principle with microservices

What is End-to-end principle

It is a design framework in computer networking that guarantees certain application-specific features, such as reliability and security, reside in the communicating end nodes of the network.

Image description
Fig: Node A is communicating with Node B through the internet

Why is it favored in networks?

Not all applications in the networks have the same functional requirements. Having application specific functions implemented in the networks comes with a cost, and the cost becomes a penalty to all the nodes that do not need those functions. It is better to implement the application specific protocols like TCP(where reliability is important), UDP(where speed is more important) at the application level, that already has to implement these functions for correctness.

How is it relevant with microservices?

Microservices architecture arranges an application as a collection of loosely coupled services.
Just like computer network, different services have different functional requirements and contracts between each other that is not necessarily shared by all the services in the application. Neither are they needed in the shared communication channels in the application.

Image description

Hence the architecture prefers Smart endpoints and Dumb pipes. A dumb pipe can do one function only, and does not support sophisticated computation and logic.

Why is it favored in microservices?

  • Service contracts can grow independently of the communication channels between the services, since it is always evolving.
  • Fast communication and feedback since the pipes are dumb and simple, thus not resource intensive.
  • Reduces the need for central contract management in the application between the services.
  • Dumb pipes are capable of supporting both request-response and observer communications, by adding the logic at end-points.
  • Easier to test and detect failures in a system with simple components, when complex logic are only at services which can be tested independently.

Top comments (0)