From Monolith to Microservices, Safely
The strangler pattern, in practice — with a rollback rope in your hand at every step, and a clear rule for when to stop.

Nobody sets out to write a monolith. It accretes until the day a three-line change takes three weeks and the team stops volunteering for the hard parts. The instinct is to rewrite. The instinct is wrong.
Draw the seams before you write a line
The whole game is where you cut. A good seam follows a business capability with a clean data boundary; a bad seam follows the org chart. We start by mapping the domain, not the code, and we look for the capability that is painful, bounded, and low-risk to run in parallel.
export async function route(req: Request) {
const useNew = await rollout.flag('checkout-v2', { slice: req.headers.get('x-capability') });
return (useNew ? checkoutV2 : legacy).handle(req);
}
Know when to stop strangling
The pattern is a means, not a religion. When the last painful capability is gone, stop. Leave the quiet old core alone, document the boundary, and spend the saved energy on the next thing that actually moves a metric. That restraint is the mark of a team that ships.
If you cannot run the old and the new at the same time, you do not have a migration — you have a flag day. Flag days are how careers end.
Take this with you
Save a copy for offline reading, or send it to a teammate who needs the playbook.
Put this to work on your stack
Every piece here came out of a real engagement. If the problem sounds like yours, a free audit is the fastest way to see it applied to your systems.
Get a free audit