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.

MonolithMicroservices
DeploymentAll or nothingPer service
ScalingWhole appPer service
Data consistencyACID transactionsEventual consistency, sagas
FailureProcess crash = outagePartial failures, need resilience
Team fitOne teamMany teams, one service each
Operations costLowHigh (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.