Monolithic Architecture: Definition

ModernLift · ·6 min read
Part 8 of 14

A monolithic architecture is one in which an application is built and deployed as a single, self-contained unit — all of its code, from user interface to business logic to data access, ships and runs together. It is the most common starting architecture and the usual counterpart to microservices, where the application is split into many independently deployable services.

A monolithic architecture is the most straightforward way to build an application: everything lives in one place and ships together. The user interface, the business logic, and the data access are all part of a single program that is built, deployed, and scaled as one unit. “Monolith” simply means one stone, a single, self-contained block.

What it is

In a monolith there is one codebase and one deployable artifact. A change anywhere means rebuilding and redeploying the whole thing. The components talk to each other through ordinary in-process calls rather than over a network, which makes a monolith simple to develop, easy to test end to end, and uncomplicated to run. There is one thing to deploy and one thing to monitor.

That single-deploy property is orthogonal to code quality. A monolith can be a clean, modular codebase with clear internal boundaries, or it can be a tangle where every file reaches into every other. The architecture describes the deployment shape, not the internal discipline.

Monolith vs. modular monolith vs. microservices

The real decision usually has three options, not two, and the middle one is the least talked about.

DimensionMonolithModular monolithMicroservices
DeploymentOne unitOne unitMany units, deployed independently
Internal boundariesOften blur over timeEnforced, in-processEnforced, over the network
Team autonomyLow, one release trainMedium, own modules, shared releaseHigh, own services and release
ScalingWhole app scales togetherWhole app scales togetherEach service scales independently
Failure isolationA bug can take the app downA bug can take the app downA failure can be contained to one service
Operational costLowLowHigh, a distributed system to run
Fits bestSmall-to-mid systems, small teamsGrowing systems that need structure without distributionLarge systems, many independent teams

A modular monolith enforces the same discipline microservices are known for, a module cannot reach into another module’s internals, it goes through a defined interface, without paying the network and operational cost of splitting the deployment. It is frequently the better next step for a system that has outgrown a tangled monolith but does not yet need the autonomy microservices buy.

What it looks like as it grows

Picture an e-commerce platform where cart, catalog, checkout, and payments logic all ship as one application. Early on, with one team, this is an advantage: a change touches one repo, one test suite, one deploy, and ships the same afternoon. As the team grows to forty engineers, the same shape starts to work against them. A typo fix on the catalog page requires the same full regression pass and redeploy as a checkout change. A memory leak in an overnight inventory batch job takes the storefront down with it, because both run in the same process. Two teams working in the same repo start colliding on the same release train, waiting on each other’s changes to ship their own.

None of this means the architecture was wrong at the start. A single deployable unit was the right call when one team owned everything. It means the system outgrew the shape that used to fit it, which is a normal, predictable event, not a sign the team built it badly the first time.

Signs it might be time to decompose

  • Independent teams keep blocking each other on the same release train.
  • One part of the system needs to scale independently, checkout traffic spikes on sale days while catalog browsing stays flat, but cannot without scaling everything.
  • A failure in a non-critical module is taking down critical paths because they share a process.
  • The codebase has grown past the point where any one team understands enough of it to change it with confidence.

If none of these are true yet, decomposing is a cost with no offsetting benefit. The honest first move is usually tightening internal boundaries into a modular monolith, not splitting the deployment.

How it relates to modernization

A large, entangled monolith is one of the most common modernization starting points. The tempting move, rewrite it as microservices in one go, is also the riskiest, because it concentrates all the risk on a single cutover. The disciplined alternative is to decompose incrementally: extract one capability at a time behind a strangler facade, prove the extracted slice matches the original’s behavior, then move on. This is re-architecting without ever stopping the system, and it works whether the destination is microservices or simply a cleaner modular monolith.

Common confusion

“Monolith” is often used as an insult, as though the architecture itself were a mistake. It is not. The problem is rarely that a system is a monolith. It is that it has become a big ball of mud, where everything depends on everything and no boundary is clean. A modular, well-structured monolith with enforced internal boundaries can be an excellent architecture, and can serve a system for its entire life without ever needing to become anything else. The goal of modernization is changeability, not a particular diagram.

Frequently asked questions

Is a monolith bad architecture?
No. A monolith is simple to build, test, and deploy, and for many systems it is the right choice. The problems associated with monoliths come from size and entanglement, not from the style itself. A well-structured monolith can serve a system for its entire life.
What is the difference between a monolith and microservices?
A monolith ships as one unit; microservices split the application into many independently deployable services. The monolith trades autonomy for simplicity; microservices trade simplicity for autonomy. Neither is universally correct — it depends on the system and the teams around it.
How do you modernize a monolith?
Rarely by rewriting it whole. The lower-risk path is to extract capabilities one at a time behind a facade, the strangler approach, proving each extracted piece behaves identically before it carries traffic, while the monolith keeps running throughout.
What is a modular monolith?
A monolith that enforces clean internal boundaries between its modules, the way microservices enforce boundaries between services, but without splitting them into separate deployable units or putting a network between them. It gives teams much of the organizational clarity of microservices, at a fraction of the operational cost, and is often a better next step than jumping straight to a distributed system.
When should you not break up a monolith?
When the team is small enough that one release train is not the bottleneck, when the domain boundaries are not yet stable (splitting around the wrong seams is expensive to undo), or when the operational cost of running a distributed system would exceed whatever coupling problem it was meant to solve. Decomposition is a cost paid up front for autonomy realized later. If nothing needs that autonomy yet, the cost has no offsetting benefit.
All 14 parts of Modernization Glossary & Definitions →