SOLID & Design Patterns Interview Question #110
What is the difference between a Modular Monolith and a traditional monolith?
Architectural Patterns, Application Boundaries & Distributed Design Patterns Senior Advanced
Quick Interview Answer
A traditional monolith may allow features to share database tables, classes, and services freely, which can create strong internal coupling. A Modular Monolith intentionally establishes module boundaries and controlled communication while retaining one deployment unit.
Detailed Explanation
A traditional monolith may allow features to share database tables, classes, and services freely, which can create strong internal coupling. A Modular Monolith intentionally establishes module boundaries and controlled communication while retaining one deployment unit.
Both run as a single application, so modularity is an architectural property rather than a deployment count.
Code Example
Traditional:
Feature A <--> Feature B <--> Feature C
Modular:
[Sales] -> contract -> [Billing]
[Inventory] -> contract -> [Sales]