§ 90
Strangler Fig
Replacing a live system piece by piece around its edges is usually safer than replacing it all at once.
Keep in mind
Make every step of a migration shippable, and plan the deletion up front
What to do
Put an interception point (a proxy, router or facade) in front of the legacy system and move one slice of behavior behind it at a time, starting with one that delivers value on its own. Define "done" at the start, track the share of traffic still on the old path, and budget deleting the old code and the transitional layer as part of the project, not as cleanup for later.
Why it happens
A complete rewrite has to reproduce years of behavior nobody wrote down, while users keep needing features the old system must still deliver, so the target moves while the new system is not yet usable. Nothing reaches production until the end, so the risk and the value both land on a cutover day that often never comes. Routing one capability at a time to new code keeps each step small enough to verify and roll back, and each step starts paying back as soon as it lands. The price is transitional architecture: interception layers and adapters built to be thrown away.
When it stops applying
Clean Cutover: when the old system cannot be intercepted cleanly, or the transitional layer would cost more than the rewrite, a single planned switch avoids the common end state of incremental migration: the easy routes move, the tangled core never does, and the organization runs and pays for two systems indefinitely.
Source
Martin Fowler, Strangler Fig Application (martinfowler.com; originally "Strangler Application", 2004; rewritten 2024) — the fig metaphor and the case that the reduced risk and earlier value of gradual modernization outweigh the cost of transitional architecture.
Read the sourceCite this
Hammurabi, § 90, “Strangler Fig.” https://kanywst.github.io/hammurabi/laws/strangler-fig/
BibTeX
@misc{hammurabi-strangler-fig,
title = {Strangler Fig},
author = {{Hammurabi contributors}},
note = {Hammurabi, § 90},
url = {https://kanywst.github.io/hammurabi/laws/strangler-fig/}
}Read in a column
- Living with old code Next in the column: Beyoncé Rule
Related laws
- 65Second-System EffectAfter a first success, designers tend to pack the ideas they deferred into the second system.
- 06Gall's LawComplex systems that work usually grew from simple systems that worked; designed ones rarely do.
- 42Ninety-Ninety RuleThe last 10% of the work tends to take as long as the first 90% did.
- 93Lehman's Laws of Software EvolutionA program in real use must keep changing or grow less useful, and each change makes it more complex unless work is spent to simplify it.
