The strangler fig pattern modernizes a legacy application one piece at a time instead of rewriting it all at once. A routing layer in front of the old system sends each feature to the old code or its new replacement, until nothing is left on the old side and it can be switched off.
The big-bang rewrite has a long record of disappointing the people who fund it. The old system keeps changing while the new one is built, the cut-over date slips, and the business spends years paying for two systems with value delivered only at the very end, if at all. The strangler fig approach exists to avoid that. This guide explains how it works, when it fits and where it goes wrong.
Where does the name strangler fig come from?
From a plant. Martin Fowler named the pattern after the strangler figs he saw in the Queensland rainforest, vines that grow around a host tree until they can stand on their own. In his article on the Strangler Fig Application, he argues that the value of the approach is that investment and returns both happen gradually and visibly, rather than in one risky jump. The metaphor is apt: the new system grows around the old one and gradually takes over its work.
How does the strangler fig pattern work in practice?
Microsoft's architecture guidance on the strangler fig pattern describes three moving parts: the legacy system, the new system, and a facade, or proxy, between them and the people using them. The work follows a repeating cycle:
- Put the facade in front of the old system. At first it routes everything to the legacy application, so nothing changes for users. This step alone is worth testing carefully.
- Pick one slice of functionality. A single screen, report, workflow or API, ideally one with clear boundaries and real value.
- Build the replacement in the new system, with the same behavior the business depends on, plus any improvements that are agreed.
- Route that slice to the new system. The facade sends those requests to the new code. If something goes wrong, routing can be switched back.
- Repeat until no requests reach the old system, then decommission it.
For a web application, the facade is often a reverse proxy or an API gateway. For a desktop or terminal application, it may be a new front end that calls old and new back ends. The mechanism varies; the principle of one routing point that can move traffic slice by slice does not.
When is the strangler fig the right approach?
It fits best when the system is too important to switch off, too large to rewrite in one go, and divisible into parts. Compare it with the other routes:
| Approach | Best when | Main risk |
|---|---|---|
| Big-bang rewrite | The system is small, well understood and can tolerate a freeze | Scope grows, the date slips and value arrives only at the end |
| Strangler fig | The system is large, business-critical and can be split by feature or route | Running two systems longer than planned if momentum is lost |
| Rehost or replatform | The code is sound but the infrastructure is the problem | Old design problems move to the new platform unchanged |
| Replace with a product | The process is standard and a product does it well | Business processes bend to fit the product |
We cover the wider choice between those routes in our guide to replatforming, refactoring or replacing a legacy system. The strangler fig is the incremental way of doing a rewrite when the rewrite is justified.
Which piece should you migrate first?
Something valuable, self-contained and not the hardest part. The first slice proves the facade, the deployment process and the team's understanding of the old system, so it should be meaningful enough to matter and small enough to finish in weeks. Good candidates are a report or dashboard users complain about, a new feature that would otherwise have to be built in the old code, or a well-bounded workflow with its own data. Poor candidates are the core transaction engine everything else depends on, which usually comes later once the team has momentum.
Before choosing, map the system. List the features users actually rely on, the data each one reads and writes, and the other systems that call into it. Legacy applications often have integrations nobody remembers, such as a nightly export to the finance system or a report a partner pulls by hand, and those need a home on the new side before the old side can be switched off. The map also shows which slices are genuinely independent and which share so much data that they have to move together.
A useful rule: stop adding new features to the legacy system as soon as the facade is in place. Every new capability is built on the new side. Otherwise the old system keeps growing while you try to shrink it.
What about the data?
Data is usually the hardest part of the pattern. While both systems run, they may need to read and write the same records. The common options are letting the new system use the legacy database for a while, synchronizing data between old and new stores, or migrating the database for each slice as it moves. Each option has costs, and the choice should be made early, not discovered halfway. Our article on why data migration is the part of every project that goes wrong covers the pitfalls in more depth.
What makes strangler fig projects fail?
- Losing momentum. The easy, visible slices move, the hard ones stay, and the organization ends up maintaining both systems indefinitely. Set a decommission target and track progress against it.
- A facade that becomes a bottleneck. The routing layer has to be reliable and fast, because every request passes through it.
- Undocumented behavior. Legacy systems do things nobody wrote down. Characterization tests that capture what the old system actually does, before replacing it, catch most of these.
- Two sources of truth. If both systems can change the same data without a clear owner, records diverge. Decide which system owns each piece of data at every stage.
- Skipping the switch-off. The pattern only pays off when the old system is decommissioned. Leaving it running "just in case" keeps its cost and its risk.
Atlas's web application development team uses incremental approaches like this to replace systems that are hard to support, starting with an assessment of what the current system actually does and ending with the old one switched off.
Frequently asked questions
How long does a strangler fig migration take?
It depends on the size of the system and how cleanly it divides, but the important difference is that value arrives throughout. The first slice can be live within weeks, rather than everything waiting for a single cut-over.
Do users notice the migration?
Ideally, only as improvements. The facade keeps the entry point the same, so users move to new screens and features gradually without a disruptive switch day.
Can the strangler fig pattern work for a desktop application?
Yes, though the facade looks different. It might be a new web front end that calls the old application's logic or database for features not yet migrated, while new features run entirely on the new stack.
Is the strangler fig pattern more expensive than a rewrite?
Running two systems in parallel has a cost, but it is offset by lower risk and earlier value. A rewrite that slips or fails outright is usually far more expensive than a migration that delivers steadily.
The Cyber-Insurance Questionnaire Gap Check
Covers MFA, endpoint protection, backups, email security, incident response and training. Each question comes with the evidence an underwriter expects to see.

