What is a Monolith

A monolith is a software system deployed as a single unit. All components — authentication, business logic, data access, background jobs — live in one codebase, compile into one artifact, and run as one process.

How it works

In a monolith, all modules share the same memory space and the same database. Communication between components is a function call — no network, no serialization. A change to any module requires rebuilding and redeploying the entire application.

Why it matters

Monoliths are simple to develop, test, and deploy when the team is small. There is one repository, one build pipeline, and one thing to monitor. Database transactions span the entire system naturally because there is one database.

The downsides emerge at scale. Large teams stepping on each other in the same codebase, slow build times, inability to scale individual components, and every deployment being an all-or-nothing operation.

A well-structured monolith with clean internal module boundaries (a "modular monolith") can defer the move to microservices until the organizational pain justifies the distributed system complexity.

For the full comparison, see How Microservices Work.