How do you replace a critical legacy system without a big-bang rewrite and its risk of failure?
When to use it
Use it when the legacy system must stay in operation, when a full rewrite would take years, or when functionality can be separated into slices. It suits web and service-based systems with a clear interface.
Where it comes from
Martin Fowler, a British software author at ThoughtWorks, described the idea in 2004 under the name 'StranglerApplication', after seeing strangler figs in Australian rainforest. He proposed replacing a legacy system gradually instead of through a risky rewrite.
Martin Fowler · 2004
Sheet 2/4
How it works
A routing layer (a facade or proxy) is placed in front of the legacy system. Individual features are rebuilt in the new system, and the router sends the relevant traffic there while the rest continues to go to the old system. Each migrated slice is in production and can be rolled back by changing the routing. When no traffic goes to the legacy system, it is retired.
You need
Knowledge of legacy functions and data, a place to put a routing layer, a prioritised list of slices, and automated tests for current behaviour.
You get
A running new system that grows slice by slice, a routing layer, and a plan and date for decommissioning the legacy system.
Sheet 3/4
Case
Illustrative case
Orbis Bank has a 20-year-old loan application system in COBOL. The team places an API gateway in front of it. First slice: the credit-score check is rebuilt as a new service, and the gateway routes 10 percent of requests, then 100 percent after parity checks. Next slices: document upload, then customer notifications. Data is synchronised both ways during the transition. After 22 months only the batch settlement runs on the mainframe, and it is moved last. Each step is reversible by a gateway setting.
A fictional company used to explain the model.
Sheet 4/4
Caution
When to avoid it
Not suitable when there is no interception point, for example a tightly coupled embedded system.
Not worth it for small systems that can be rewritten in a few weeks.
Common mistakes
Leaving the last 10 percent of legacy features in place indefinitely.
Forgetting to plan data migration and synchronisation.
Building the new system without tests for existing behaviour.
Allowing the routing layer to become a new monolith.
Known weaknesses
Two systems must be run and synchronised for a long time
Needs a clean interception point, which many legacy systems lack
Data migration is the hardest part and is often underestimated
Can stall with the last legacy components left running
How to apply it in 6 steps
How to apply it
Strangler Fig Pattern
6 steps
01of 6
Step 1 of 6: Assess the legacy system
Map its functions, data and interfaces, and find natural slices.
01
02of 6
Step 2 of 6: Place a routing layer
Introduce a facade or proxy in front of the legacy system without changing behaviour.
02
03of 6
Step 3 of 6: Rebuild one slice
Build one function in the new system with tests that match legacy behaviour.
03
04of 6
Step 4 of 6: Redirect traffic
Route the slice's requests to the new system, with the option to switch back.
04
05of 6
Step 5 of 6: Repeat by priority
Migrate slice after slice, including data, as the legacy part shrinks.
05
06of 6
Step 6 of 6: Decommission
Switch off the legacy system once no traffic or data depends on it.
06
Click to unfold
Use the arrow keys to move between steps, Home and End for the first and last, and Enter to fold or unfold the booklet.
View all 6 steps
01
Assess the legacy system
Map its functions, data and interfaces, and find natural slices.
02
Place a routing layer
Introduce a facade or proxy in front of the legacy system without changing behaviour.
03
Rebuild one slice
Build one function in the new system with tests that match legacy behaviour.
04
Redirect traffic
Route the slice's requests to the new system, with the option to switch back.
05
Repeat by priority
Migrate slice after slice, including data, as the legacy part shrinks.
06
Decommission
Switch off the legacy system once no traffic or data depends on it.
Which decisions it helps with
Decision profile
A phased process to take action on a product or service.
Keyboard: Tab to the sheet, use the arrows to explore the assessments and their questions, and press Escape to close the note.
IIdentity
Type of tool
Phased processvery likely
The questionWhat kind of tool is it?Assessment · Phased process · 91 %
Decision stage
Plan the work, roles and deadlineslikely
The questionWhat stage of the decision are you at?Assessment · Plan the work, roles and deadlines · 61 %
What it applies to
A product or servicevery likely
The questionWhat is the decision about?Assessment · A product or service · 88 %
Discipline
Agile and software developmentvery likely
The questionWhich discipline does it come from?Assessment · Agile and software development · 99 %
What it produces
A sequence of phases completed in ordervery likely
The questionWhat kind of tool is it?Assessment · A sequence of phases completed in order · 91 %
IIIResources required
TimeWeeks or monthsThe questionHow much time can you spend on this?Assessment · Weeks or months · confidence 100 %
PeopleA small group (2 to 8)The questionHow many people will take part?Assessment · A small group (2 to 8) · confidence 16 %
DataA few readily available factsThe questionWhat data do you have available?Assessment · A few readily available facts · confidence 60 %
ExpertiseWorks best with a facilitatorThe questionDoes anyone have experience with methods like these?Assessment · Works best with a facilitator · confidence 91 %
Time horizonOne to three yearsThe questionHow far ahead do you need to plan?Assessment · One to three years · confidence 97 %
ScopeBetween “one team” and “a unit or department”The questionWho will this decision affect?Assessment · Between “one team” and “a unit or department” · confidence 57 %
FrequencyOccasionallyThe questionIs this a one-off decision or something you expect to repeat?Assessment · Occasionally · confidence 55 %
The team’s own knowledge is enoughThe questionCan you speak to customers, users or people outside your organisation?Assessment · The team’s own knowledge is enough
IITen axes
The dot shows which end the model favours. A hollow dot means no clear preference.
DirectionExecutionThe questionAre you setting direction or improving day-to-day operations?Assessment · Mostly execution · confidence 57 %
Top-downmixedBottom-upThe questionShould leadership set the direction, or should the answer come from the people doing the work?Assessment · no clear preference (probability is spread across several levels)
PeopleProcessesThe questionIs this mainly a people problem or a process problem?Assessment · Processes · confidence 95 %
Generate optionsNarrow down optionsThe questionDo you need to generate more options or narrow them down?Assessment · Mostly narrow down options · confidence 51 %
Step-by-step analysisIntuition and experienceThe questionWould you rather work through the evidence step by step or draw on the group’s experience?Assessment · Mostly analysis · confidence 65 %
A strict sequence of stepsA flexible frameworkThe questionWould you prefer a precise set of steps or a framework you can adapt?Assessment · Mostly a flexible framework · confidence 46 %
Protect what we haveTake a riskThe questionDo you need to protect what you have or take a chance on something new?Assessment · Mostly protect · confidence 62 %
Improve what we haveFundamental changeThe questionDo you want to improve what you have or change it fundamentally?Assessment · Mostly fundamental change · confidence 62 %
Inside the organisationOutside the organisationThe questionWhere do you expect to find the answer, inside your organisation or in the market?Assessment · Inside the organisation · confidence 85 %
Understand firstAct nowThe questionDo you need to understand the situation first or act now and learn as you go?Assessment · Mostly act now · confidence 60 %
IVUseful when
Applicable traits
How it supports actionDecide what comes firstThe questionWhat do you need in order to act?Assessment · Decide what comes first · 98 %
Product stageGrowing an existing productThe questionWhat stage is your product at?Assessment · Growing an existing product · 100 %
How was this profile calculated?
An automated system reads each model card and answers the same questions for every model. This profile has answers for 77 of 77. No answers are entered by hand.
A very high probability counts as “yes” and a very low one as “no”. Intermediate answers are hidden.
On the axes, mixed means the model favours neither end.
Pattern LibrarySame stage: take action · same subject · for larger groups
Verified sources
Use the arrow keys to move between sources.
Original work
Fowler, M. (2004). StranglerApplication. martinfowler.com bliki.Archived bliki page dated 29 June 2004 that introduces the strangler vine metaphor from Australian rainforest and gradual replacement of a legacy system.View source: StranglerApplication (opens in a new tab) ↗
Li, C., Ma, S. and Lu, T. (2020). Microservice Migration Using Strangler Fig Pattern: A Case Study on the Green Button System. 2020 International Computer Symposium (ICS), 519-524.Academic case study applying the Strangler Fig pattern with Domain-Driven Design to migrate a monolith, with quantitative performance measurements during the migration; notes that a complete, systematic migration process was still lacking.View source: Microservice Migration Using Strangler Fig Pattern: A Case Study on the Green Button System (opens in a new tab) ↗
Fowler, M. (2024). Strangler Fig. martinfowler.com bliki.Fowler's 22 Aug 2024 revision renames the pattern 'Strangler Fig' and recounts the 2001 Queensland rainforest origin of the metaphor.View source: Strangler Fig (opens in a new tab) ↗
The catalogue does not yet list a published critique of this specific model.