You are modernising a fifteen-year-old monolith with the strangler pattern. Which slice do you extract first, and why?
Show the full answer Hide the answer
The criteria, in order
Low coupling to shared state. The extraction cost is dominated by data, not by code. A slice that reads and writes tables twelve other modules also use requires either a distributed transaction, a synchronisation mechanism, or a much larger extraction. A slice with its own data is a fraction of the work.
A clear boundary in the business language. If the business has a word for it and that word means one thing, the boundary probably exists in the domain rather than only in the code.
Genuine but bounded value. Enough that the organisation notices, not so much that failure is unacceptable. The first extraction is as much about proving the mechanism — the facade, the routing, the deployment, the rollback — as about the slice itself.
Change frequency. A part that changes often repays independent deployment immediately; a stable part gains little.
What not to choose first
Not the most valuable part. That makes the first cutover also the first rehearsal.
Not the most entangled part, however tempting, because the extraction will take months and produce no evidence that the approach works until it is finished.
Not something with no traffic. A slice nobody uses does not prove the facade, the routing or the operational path.
The facade is the real first deliverable
Before any slice moves, all traffic routes through an interception point — a gateway, a proxy, a routing layer inside the monolith. It initially forwards everything unchanged, which is a change with no behavioural effect and is therefore safe to deploy and verify.
Once it exists, each extraction is a routing decision that can be made per endpoint, per percentage and per user cohort, and reversed the same way. Without it, every extraction is a big-bang cutover.
What proves the first slice succeeded
Not that the new service works. That it can be deployed independently, that traffic can be shifted incrementally and shifted back, and that the team measured how long the whole thing took — because that number is what makes the plan for the remaining slices credible rather than aspirational.