What is a Modular Monolith?
A Modular Monolith is an architectural style that aims to combine the best aspects of traditional monolithic architectures and microservices. It organizes the software application into well-defined, loosely coupled modules. Each module is responsible for a specific business capability. However, unlike microservices, all these modules are deployed as a single unit like a monolith.
The core principles of a Modular Monolith are:
- Treat each module as a microservice
- Deploy the application as a single unit
Here are the fundamental principles of a successful microservice as studied in Chapter 19, Introduction to Microservices Architecture:
- Each microservice should be a cohesive unit of business
- Each microservice should own its data
- Each microservice should be independent of the others
In a nutshell, we get the best of both worlds. Yet, understanding how a Modular Monolith compares with the microservices...