HandbookXV the PantheonMonolith or microservices
XVthe Pantheon, Design the systemMonolith or microservices
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.
What goes wrong
- 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.
- 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.
- 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
Quick check
Sign in to earn +10 XP for itHarbor's team of eight is weighing microservices. Which reason is strongest?