Microservices provide much better decoupling. Therefore, they help to modularize and isolate software modules (see Advantages). However, microservices are modules of a larger system. Therefore, they must be integrated. This poses a challenge for the architecture:
- On the one hand, the architecture has to ensure that the microservices can work together to form the overall system.
- On the other hand, the freedom of the microservices should not be too restricted since this would compromise their isolation and independence which are required for most of the benefits of a microservice architecture.
For this reason, it is advisable to divide the architecture into a micro and a macro architecture.
- The micro architecture comprises all decisions that can be made individually for each microservice.
- The macro architecture consists of all decisions that can be made at a global level and apply to all microservices.