High cohesion with a single responsibility

High cohesion means a module or unit should execute a single business function. In the microservice architecture, an individual service should perform a single responsibility for a given application context. Sharing a single responsibility between multiple services should not be allowed. Also, a single service should not handle multiple responsibilities, in order to make the whole system truly modular.

This is one of the striking differences between the monolithic and microservice architectures. The components are logically separated but are still part of a single application and share some common responsibilities in the former, but they are designed as independent small applications in the latter.

While designing microservices, the goal should be the scope of the business function executed by the microservice instead of making it smaller. The term micro is sometimes misleading, suggesting you should make the service as small as possible. The scope should be given the highest priority, instead of the size of the service. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.239.123