← Concepts
Distributed Systems·3 min read

Monolith vs Microservices

One deployable unit that's simple but couples everything, vs many small services that scale teams but cost you a distributed system.

First time reading this? Start here

Plain English: a monolith is your whole app in one codebase you deploy as one thing, simple until it's huge. Microservices split it into many small services that deploy independently. That's flexible, but now you own a distributed system with all its pain (network calls, partial failures, hard debugging).

Used in:NetflixURL ShortenerUber
What it is

Two ends of an architectural spectrum. A monolith packages all functionality into a single deployable artifact sharing one process and (usually) one database. Microservices decompose the system into independently deployable services, each owning its data and communicating over the network (REST, gRPC, or async messaging).

The problem it solves

The real problem isn't technical; it's organizational scaling. A monolith is the right default: one repo, one deploy, in-process calls, easy transactions. It only becomes painful when dozens of engineers contend over the same codebase and deploy pipeline, or when one component needs to scale independently. Microservices let teams own and ship pieces autonomously, at the cost of turning every in-process call into a network call.

How it works

Monolith: modules call each other as function calls; one ACID database; one CI/CD pipeline; scale by running more copies of the whole thing behind a load balancer. Microservices: each service has its own datastore and API; calls cross the network; you need service discovery, an API gateway, distributed tracing, and a strategy for cross-service consistency (sagas, eventual consistency). The migration path is usually 'modular monolith → extract the seams that hurt', not a big-bang rewrite.

Why use it
What it costs you
Where it shows up in our architectures
Gotchas

Your notes

Private to you