StoicBuilder

HandbookXV the PantheonMonolith or microservices

XVthe Pantheon, Design the system

Monolith or microservices

1 min readUpdated 28 November

In plain words

A monolith is one application deployed as a unit; microservices split it into separately deployed services that talk over the network, buying independent scaling and releases at the price of distributed-system problems.

Where you see it

Harbor's CTO wants to split the app into twelve services because that's what large companies do. The team is eight people. A billing change would then mean three services deployed in order, network calls where function calls used to be, and traces to debug it.

Trade-offsagent
Monolith MicroservicesDeploy one unit each service on its ownA call between function call, fast network call, slower, can failData one database, joins a database per service, no joinsDebugging one stack trace traces across servicesSuits small to medium teams several teams blocking each other's releases
Microservices mostly solve a people problem: many teams that need to ship without waiting for each other.

What goes wrong

  1. A distributed monolith

    Services that share a database or must be deployed together have all the costs of microservices and none of the independence. If two services always change together, they're one service.

  2. Splitting by technical layer

    A frontend service, a logic service and a data service means every feature touches all three. Split along business capabilities, such as billing, deploys and identity, where changes tend to stay inside one boundary.

  3. Splitting before the boundaries are clear

    Moving code behind a network boundary makes a wrong guess expensive to undo. Start with a modular monolith, watch which modules change on their own, and extract only those that need to scale or release separately.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Before we split anything out of the monolith, map our modules, how they call each other, which tables each reads and writes, and how often each changed in the last six months. Recommend at most one candidate to extract, with the reason it needs to scale or deploy on its own, or tell me we shouldn't split yet.

Quick check

Sign in to earn +10 XP for it

Harbor's team of eight is weighing microservices. Which reason is strongest?

Got a prompt that touches monolith or microservices?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.