The strangler fig pattern replaces a legacy system one capability at a time. How to find seams, move data without losing the way back, sequence the work, and measure whether the old system is really shrinking.

The case for a full rewrite usually sounds tidy. The old code is hard to change, the platform is out of support, and starting fresh looks faster than untangling it. The trouble shows up later. Martin Fowler's summary is short: replacing a serious IT system takes a long time, and the users can't wait for new features [1]. While the rewrite is under way, the old system keeps changing, and the target moves.
Thoughtworks' Ian Cartwright, Rob Horn and James Lewis name a second trap in their patterns of legacy displacement. Many failed efforts began by promising the business exactly what it had today, and they found that defining and agreeing the current "as is" functionality was itself a huge effort [2]. Feature parity sounds like a safe goal. In practice it commits a team to rebuilding behaviour that nobody has written down, including the parts nobody uses.
The alternative is to replace the system a piece at a time while it keeps running.
Fowler named the approach after the strangler figs he saw in Queensland's rainforests: vines that germinate in a nook of a host tree, draw on it until they reach the ground and the canopy, and then become self-sustaining [1]. In software, new components are built around the edges of the old system and take over its work gradually. Fowler's argument for it is about risk and timing: each step is small, the team learns as it goes, and value arrives earlier instead of at the end [1].
Microsoft's Azure Architecture Center describes the mechanics in four stages [3]:
1. client -> facade -> legacy (most routes) new (first routes)
2. client -> facade -> legacy (fewer routes) new (more routes)
3. client -> facade ---------------------------> new (all routes); legacy decommissioned
4. client ------------------------------------> new; facade removed or kept as an adapter
A facade (a proxy) intercepts requests and routes each one to the legacy system or the new service [3]. Clients keep using the same interface. As each capability moves, the facade's routing table changes, and eventually the legacy system has no work left.
The same guidance is clear about where the pattern does not fit: when requests to the back end cannot be intercepted, when you cannot change the legacy system or any integration point such as its database, when the system is small enough to replace whole, or when the original must be decommissioned quickly [3]. Check these before committing to it.
Michael Feathers' definition, quoted by Fowler, is the working one: "a seam is a place where you can alter behavior in your program without editing in that place" [4]. Feathers was writing about code and tests. At the scale of a whole application, the useful seams are the places where traffic or data already crosses a boundary:
Where the new and old systems must call each other during the migration, Azure recommends an anti-corruption layer that translates between them, so that legacy conventions do not leak into the new design [3]. Cartwright and colleagues describe the mirror case, legacy mimic, in which the new system behaves so that the old one is unaware anything has changed [2].
Moving request routing is the easy half. The hard half is moving the system of record: the store whose data is authoritative for a domain. Until that moves, the new service is a new front end on old data.
Azure's database example breaks this into three phases [3]:
The important detail is the rollback window. Rolling back is possible during phase 2 and at the start of phase 3, while the legacy objects and sync still exist. Once they are removed, going back means restoring objects and replaying changes, so Azure advises treating removal as a deliberate final step taken only after validation [3].
Within a schema, the same discipline is called parallel change, or expand and contract: add the new structure beside the old, migrate clients over, then remove the old structure once nothing uses it. Danilo Sato notes that most database refactorings follow this shape [6]. Each schema change becomes a series of small, separately deployable steps, and every intermediate state is one the running system can live with.
Before switching traffic, two verification techniques reduce surprises. Parallel running keeps both implementations working on the same input so that key numbers can be checked against each other, and can stay in place for a while with an alert if the two start to diverge [8]. Dark launching calls the new back end from real traffic without using its output, to see the load and performance impact before anyone depends on it [7]. Comparing outputs is also how teams discover the undocumented behaviour that the feature-parity approach would have had to specify up front.
The order-management system, its six capabilities and every score in this section are invented for illustration. They do not describe a client, a Daivota project or measured data. Take an order-management monolith with six capabilities sharing one database, and score each on four questions, from 1 (low) to 3 (high):
| Capability | Change demand | Business value of moving | Data coupling (writes shared tables) | Cut-over risk | Seam available |
|---|---|---|---|---|---|
| Product catalogue (read) | 3 | 2 | 1 | 1 | HTTP routes |
| Customer notifications | 2 | 2 | 1 | 1 | Order-status events |
| Pricing and discounts | 3 | 3 | 2 | 2 | Internal module (branch by abstraction) |
| Order capture | 2 | 3 | 3 | 3 | HTTP routes plus shared tables |
| Invoicing | 1 | 2 | 3 | 3 | Nightly batch |
| Management reports | 1 | 1 | 1 | 1 | Read replica |
A simple rule of thumb orders the work: start where change demand is high and coupling and risk are low, so that the first steps both prove the facade and pay for themselves.
In this illustrative scoring, pricing scores higher on value than catalogue does. It still goes third, because the first step is also where the team builds the facade and learns the legacy system's behaviour, and that is cheaper to learn on read-only traffic.
Modernisation programmes are easy to report as activity and hard to report as progress. The measures below are ours; they are chosen because each one moves only when legacy responsibility actually goes away.
| Measure | What it tells you | Why it resists gaming |
|---|---|---|
| Share of requests per capability served by the new path | Routing progress | Read from facade logs, not from plans |
| Capabilities whose system of record has moved | Data progress | Binary per domain; the legacy tables are gone or they are not |
| Legacy code and database objects deleted | Real shrinkage | Counts removal, not new code |
| Parallel-run mismatch rate per capability | Readiness to switch | A falling trend is the evidence for cut-over |
| Transitional components still running | Cost of the scaffolding | Should rise early and fall to zero |
The last row matters because facades, adapters, sync jobs and comparison harnesses are real software. Fowler calls this transitional architecture and accepts its cost in exchange for lower risk and earlier value [1]. Cartwright and colleagues ask teams to be explicit and transparent about the trade-off between the value of risk mitigation and the cost of transitional architecture, and to quantify that value so that investment can be tracked against it [2]. Azure adds two operational points: make sure the facade keeps up with the migration, and make sure it does not become a single point of failure or a performance bottleneck [3]. The reliability practices in reliability practices for enterprise APIs apply directly to the facade.
Sequencing a programme like this is part of how we approach technology strategic planning, and the facade, pipelines and observability it depends on fall under cloud and DevOps engineering.
Prepared with AI-assisted research and drafting.
[1] M. Fowler, "Strangler Fig Application", martinfowler.com, 2024. https://martinfowler.com/bliki/StranglerFigApplication.html
[2] I. Cartwright, R. Horn and J. Lewis, "Patterns of Legacy Displacement", martinfowler.com, 2024. https://martinfowler.com/articles/patterns-legacy-displacement/
[3] Microsoft, "Strangler Fig pattern", Azure Architecture Center, Microsoft Learn, 2026. https://learn.microsoft.com/en-us/azure/architecture/patterns/strangler-fig
[4] M. Fowler, "Legacy Seam", martinfowler.com, 2024. https://martinfowler.com/bliki/LegacySeam.html
[5] M. Fowler, "Branch By Abstraction", martinfowler.com, 2014. https://martinfowler.com/bliki/BranchByAbstraction.html
[6] D. Sato, "Parallel Change", martinfowler.com, 2014. https://martinfowler.com/bliki/ParallelChange.html
[7] M. Fowler, "Dark Launching", martinfowler.com, 2020. https://martinfowler.com/bliki/DarkLaunching.html
[8] I. Cartwright, R. Horn and J. Lewis, "Divert the Flow", Patterns of Legacy Displacement, martinfowler.com, 2022. https://martinfowler.com/articles/patterns-legacy-displacement/divert-the-flow.html