AlgoViz

Microservices or monolith

easy 28 min

A 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 hearSayBecause
Five developers, first versionModular monolithNothing to coordinate yet
Teams wait for each other's releasesExtract the part that blocks mostIndependent release
Video encoding starves the web requestsA separate encoding serviceDifferent hardware and load
Card data must be isolatedA separate payment serviceA smaller area to protect
Everything must be microservicesWhich 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.