Software Development Models: The ‘Strangler Fig’ Legacy Migration

Software Development Models: The ‘Strangler Fig’ Legacy Migration

The core operations of a €50M logistics company are running on a 15-year-old monolithic application built in PHP 5. The codebase is incredibly fragile. Every time a developer tries to add a new feature, two other unrelated features break. The application is a massive liability.

The CTO decides it is time for a modernization project. They evaluate their software development models and choose the most common, and most fatal, strategy: The “Big Bang Rewrite.”

The CTO hires an offshore agency. The agency promises to rewrite the entire 15-year-old application in modern Node.js and React within 12 months.

During those 12 months, the internal engineering team is forced to maintain the old PHP system, while the offshore team builds the new system in isolation. 18 months later, the new system is finally “ready.” They flip the switch and route all traffic to the new Node.js app.

It is a catastrophe. The new system immediately crashes under the real-world data load. Critical business rules that were buried deep in the old PHP code (and never documented) were completely missed by the offshore team. The CTO is fired, and the company rolls back to the 15-year-old PHP monolith.

Why the “Big Bang Rewrite” Fails

In custom software development, the Big Bang Rewrite is statistically the most dangerous project you can undertake.

It assumes that a new engineering team can perfectly replicate 15 years of accumulated, undocumented business logic in just 12 months, while hitting a moving target (because the old system is still being used and modified in production).

It is the architectural equivalent of trying to change the engines on an airplane while it is flying.

Joel Spolsky, in his widely cited 2000 essay “Things You Should Never Do, Part I,” called this exact decision “the single worst strategic mistake that any software company can make.” Spolsky was writing about Netscape, whose decision to rewrite its browser from scratch created a three-year release gap that competitors used to seize the market. The same dynamic plays out inside enterprise IT departments: a team spends two years rebuilding a system that already works, learns the hard way why the old code had all those strange edge cases, and often ships something worse than what it replaced.

The “Strangler Fig” Application Model

Elite software architects do not do Big Bang Rewrites. They use a completely different software development model for legacy modernization, popularized by Martin Fowler: The Strangler Fig Pattern.

In nature, a strangler fig tree grows by seeding itself in the upper branches of an older tree. Over time, the fig tree’s roots grow down, enveloping and eventually replacing the host tree completely, leaving a strong, new structure in its place.

In software architecture, this translates to a safe, incremental migration:

1. The API Gateway (The Trunk)

Instead of rewriting the whole app, the Architect places an API Gateway (or a routing layer like NGINX) in front of the legacy PHP monolith. Initially, 100% of user traffic is routed straight through the Gateway to the old monolith. The users notice no change.

2. Decoupling the First Microservice (The Roots)

The engineering team identifies one specific, isolated piece of functionality – for example, the “Email Notification Service.”
The team builds a brand-new, modern Microservice [e.g., in Node.js] that only handles email notifications. They rigorously test it.

3. Routing the Traffic (The Strangulation)

The Architect updates the API Gateway. Now, when a user triggers an email, the Gateway intercepts that specific request and routes it to the new Node.js microservice. All other traffic [billing, logistics] still goes to the old PHP monolith.

The new microservice is now live in production. If it fails, the Architect simply updates the Gateway to route traffic back to the old PHP code in milliseconds. The risk is practically zero.

Over the next 18 months, the team continues this process, slowly carving out services one by one [Billing, then User Auth, then Logistics] until the legacy monolith is completely bypassed and can be safely deleted.

The Database Strangulation Problem: Migrating Shared State

The three steps above make the Strangler Fig pattern sound clean at the application layer. But the hardest part of any legacy modernization is never the API routing; it is the database.

The legacy PHP monolith and the new microservices frequently need to read and write the same underlying data during the transition period, which can last 18 months or more. If you get this wrong, you end up with two versions of the truth: a customer’s address updated in the new microservice, but the old monolith’s report still shows the stale record, because the two systems don’t share state.

1. Dual Writes Are a Trap

The naive fix is a “dual write”: the application writes to both the old monolith’s database and the new microservice’s database simultaneously. This is fragile. If the second write fails after the first one succeeds [a dropped network packet, a timeout], the two databases silently diverge, and nobody notices until finance flags a discrepancy during reconciliation weeks later.

2. Change Data Capture (CDC) as the Real Solution

Mature engineering teams solve this with Change Data Capture instead. A tool like Debezium reads the legacy monolith’s database transaction log directly (not through application code) and streams every insert, update, and delete as an event onto a message bus like Kafka. The new microservice subscribes to that event stream and keeps its own database synchronized in near-instant, without the legacy application ever needing to know the new service exists. This decouples the migration timeline from the legacy codebase’s fragility: you are reading the database’s transaction log, not touching the 15-year-old PHP code at all.

3. The Cutover Checklist for the Database Layer

Before an Architect redirects the API Gateway to route a domain’s traffic to the new microservice, they must verify three things:
– Reconciliation parity: An automated job compares row counts and checksums between the old and new database for that domain, run continuously for at least one full business cycle [for example, a full monthly billing run] with zero discrepancies.
– Rollback direction is proven, not assumed: The team has tested, not just documented, reversing the CDC pipeline, so that if the new microservice needs to be rolled back, data written to the new database during the cutover window can flow back into the legacy system without loss.
– A designated data owner signs off: A single named engineer, not a committee, is accountable for confirming the domain’s data is safe to cut over, removing the ambiguity that causes most legacy migrations to stall in “almost done” for months.

Only once the database layer has its own strangulation strategy, not just the API layer, is a Strangler Fig migration actually safe to execute at enterprise scale.

Why Large Rewrites Fail at the Portfolio Level, Not Just Anecdotally

The Netscape story is famous, but it is not an outlier. The Standish Group’s long-running CHAOS Report research on IT project outcomes has repeatedly found that project size is one of the strongest predictors of failure: large IT projects (roughly $10 million or more) have historically been more than ten times as likely to be canceled outright as projects under $1 million, and even the large projects that do complete routinely run far over their original cost and schedule estimates. A 15-year PHP monolith rewrite for a €50M logistics company sits squarely in the size bracket where the data says the odds are stacked against you before a single line of code is written.

This is exactly why Martin Fowler’s Strangler Fig pattern, which he first wrote about in a 2004 bliki post after observing actual strangler fig vines during a trip to Queensland, Australia, has held up as the industry-standard alternative for two decades. It doesn’t eliminate the total amount of engineering work a modernization requires. What it does is convert one $10 million, all-or-nothing project with a 12-to-24-month blind spot into a series of much smaller projects, each shippable, testable, and reversible in isolation, which is precisely the profile the CHAOS data associates with success.

A Worked Comparison: The €50M Logistics Company’s Two Paths

Returning to the opening scenario, here is an illustrative comparison of what the Big Bang Rewrite and the Strangler Fig approach tend to look like in practice for a monolith of this size and age. These are realistic planning figures for a project of this scope, not one client’s actual contract.

Big Bang Rewrite
– 12-month fixed-price contract, offshore team working in isolation from the production system: initial quote roughly €800,000-1,000,000.
– Month 12: launch date slips, as it does in the large majority of large rewrites, commonly by 6 months or more.
– Month 18: the new system finally launches, immediately fails under real production load, and undocumented business rules buried in the old PHP code [tax exceptions, regional shipping overrides, a decade of one-off customer accommodations] are discovered missing, one angry support ticket at a time.
– Outcome: rollback to the legacy system, the original contract value largely sunk, and the organization now more wary of modernization than before it started, often delaying the next attempt by a year or more.

Strangler Fig migration
– Same overall scope, decomposed into 6-10 domains [Email Notifications, Billing, User Auth, Logistics, Reporting, and so on], each migrated independently behind an API Gateway.
– First microservice [typically the lowest-risk, highest-value domain] ships to production within 4-8 weeks, not 18 months, giving the CTO a real, working proof point early.
– Total engineering spend over 18-24 months lands in a broadly comparable range to the Big Bang quote, but spread across working increments instead of a single bet, with a functioning legacy system as the fallback at every single stage.
– Outcome: by month 18, most or all domains have been migrated, each one validated independently in production, and if any single domain’s microservice underperforms, the API Gateway routes traffic back to the legacy code path in milliseconds instead of triggering a company-wide rollback.

The total headline cost of the two approaches is often similar. The difference that matters is where the risk sits: concentrated in one irreversible cutover eighteen months in, or distributed across a dozen small, reversible cutovers the team can absorb one at a time.

The Manifera Modernization Execution

Standard offshore software development agencies love pitching the Big Bang Rewrite because it allows them to sell you a massive, 12-month fixed-price contract with junior developers working in isolation.

At Manifera, we refuse to execute Big Bang Rewrites for enterprise clients.

Through our Hybrid Offshore model, our Dutch Architects enforce the Strangler Fig pattern. They map out the API boundaries of your legacy system and design the gradual microservice architecture.

Our Vietnamese engineering pods then execute the decoupling process, deploying new, modernized services into production week by week, rather than year by year. You see ROI immediately, and your business operations are never subjected to the catastrophic risk of a full-system swap.

Stop rewriting software from scratch. Contact our Amsterdam team to modernize your legacy system safely using the Strangler Fig pattern.

FAQs

[Scenario: CTO proposing a legacy rewrite] What is a ‘Big Bang Rewrite’ and why is it so dangerous?

A Big Bang Rewrite is an attempt to build a completely new version of a legacy application from scratch and then instantly switch all users to the new system on launch day. It is dangerous because it requires the new team to perfectly replicate years of undocumented, complex business logic. The new system almost always lacks critical edge-case features and crashes upon launch.

[Scenario: VP Engineering planning a modernization strategy] What is the ‘Strangler Fig’ architectural pattern?

Instead of replacing a legacy system all at once, the Strangler Fig pattern involves placing an API Gateway in front of the old system. You then gradually build modern microservices piece by piece [e.g., replacing just the Billing module]. The Gateway routes ‘Billing’ traffic to the new service, while keeping the rest of the traffic on the old system. You slowly ‘strangle’ the old monolith until it is completely replaced.

[Scenario: Lead Developer worried about downtime risk] How does the Strangler Fig pattern reduce deployment risk?

Because the migration is incremental. If you deploy a new modern ‘Billing’ microservice and it fails in production, you simply configure the API Gateway to instantly route traffic back to the legacy monolith’s billing code. The downtime is measured in seconds, not days, making the modernization process incredibly safe.

[Scenario: IT Director managing budget constraints] Does the Strangler Fig approach cost more than a complete rewrite?

In theory, the initial setup of an API Gateway takes slight effort, but in reality, it is vastly cheaper. Big Bang Rewrites usually run 100% over budget because of unexpected complexities discovered at the end of the project. The Strangler Fig approach delivers modern, usable features into production within weeks, providing immediate ROI and predictable, incremental costs.

[Scenario: Procurement Officer evaluating Manifera] How does Manifera execute legacy modernization projects?

Our Dutch Architects perform an initial audit of your legacy system to define the API boundaries and identify which isolated module to modernize first [the lowest risk, highest value module]. Our Vietnamese engineering pods then build that specific microservice and integrate it via an API Gateway. We repeat this governed process until your entire system is modernized safely.

How useful was this post?

Share it with your friends

Get our latest articles here!

Thank you for subscribing to our blog!

Do you have any questions?

Help us improve the content of this Insightful blog by asking us questions. Manifera's team of experts will help you answer these questions as soon as possible.

    What is Refresh icon

    Contact