Roadmap › Microservices & System Design with .NET › Module: Architecture Styles
Lessons in this course (9)
1. Monolith, modular monolith and microservices
Basic★ Must knowLesson 1 of 9
Monolith — all features in one process and one database.
- ✅ Simple development, debugging, transactions, deployment.
- ❌ Grows into a "big ball of mud"; one bug or slow module affects all; the whole app scales together.
Modular monolith — one deployable, but modules are isolated:
text
Shop.Api (one process)
├── Modules/Orders (orders schema, IOrdersModule public API)
├── Modules/Catalog (catalog schema)
└── Modules/Billing (billing schema)
Rule: modules talk only through public interfaces or in-process events — never each other's tables.Microservices — each module becomes its own service with its own database and pipeline.
| Monolith | Microservices | |
|---|---|---|
| Deployment | All or nothing | Per service |
| Scaling | Whole app | Per service |
| Data consistency | ACID transactions | Eventual consistency, sagas |
| Failure | Process crash = outage | Partial failures, need resilience |
| Team fit | One team | Many teams, one service each |
| Operations cost | Low | High (CI/CD, monitoring, networking) |
Interview tip: "I would start with a modular monolith and extract a service when a module needs independent scaling, release cadence or ownership." This is the answer most senior interviewers want.