Microservices or monolith
easy 28 minA monolith is one program, built and released as a whole.
When it comes up
The moments this idea belongs in a design interview, and the moments it does not.
Signals
When to bring it up
| You hear | Say | Because |
|---|---|---|
| Five developers, first version | Modular monolith | Nothing to coordinate yet |
| Teams wait for each other's releases | Extract the part that blocks most | Independent release |
| Video encoding starves the web requests | A separate encoding service | Different hardware and load |
| Card data must be isolated | A separate payment service | A smaller area to protect |
| Everything must be microservices | Which problem do we have? | The split has a price |
Options
Compare your moves
A growing shop has one big application. Releases take days. What now?
BreaksRewrite everything as 40 services
- How
- Stop features and convert all modules.
- Limit
- A year without results, wrong boundaries, and 40 things to run.
- Choose when
- Never as one step.
WorksMake the release itself faster
- How
- Automate tests, deploy small changes, enforce module boundaries.
- Limit
- Many teams still share one release.
- Choose when
- First, and often it is enough.
StrongExtract one part behind a facade
- How
- Pick the part with the clearest reason, move its data, shift traffic by flag, delete the old code.
- Limit
- Two systems to run during the move.
- Choose when
- Teams block each other or one part has its own load, and a platform exists.