Custom Software Development

Strangler Fig Pattern vs. Big Bang Rewrite: How to Modernize a Legacy System

Shubham Parmar7 min read
Strangler Fig Pattern vs. Big Bang Rewrite — legacy system modernization banner

In short: A big bang rewrite replaces your legacy system in one cutover, after months of parallel building, with everything live or nothing live. The strangler fig pattern replaces it piece by piece — new functionality goes live behind a routing layer while the legacy system keeps running the parts not yet migrated. Most production systems should default to the strangler fig approach; a big bang rewrite is only justified when the system is small enough that concentrating the risk into one cutover doesn't matter.

What this means for you

  • Strangler fig migrations fail in two specific, predictable ways — a shared mutable database and no clean interception point — both are discoverable before you start.
  • A big bang rewrite isn't wrong by default; it's wrong at the scale most "legacy system" conversations are actually about.
  • The real decision isn't "rewrite or don't" — it's which pieces are safe to intercept first.

Every legacy modernization conversation eventually asks the same question: replace it all at once, or replace it in pieces? The honest answer depends on how coupled the system actually is — not on which approach sounds more thorough.

What each approach actually is

Big bang rewrite

A big bang rewrite means building the replacement system in parallel with the legacy one, then switching over in a single cutover once the new system is judged feature-complete. Nothing goes live until everything does. The appeal is obvious: no time spent running two systems side by side, no routing layer, no partial states to reason about.

Strangler fig pattern

The strangler fig pattern — named after the vine that grows around a host tree and gradually replaces it — builds new services alongside the legacy system and routes traffic to them one capability at a time, through a facade or proxy layer that decides which system handles each request. The legacy system keeps running the parts not yet migrated. Over time, as more capabilities move to the new system, the legacy system's footprint shrinks until there's little or nothing left to retire.

Why a big bang rewrite concentrates risk

The core problem with a big bang rewrite isn't the engineering — it's that every migration risk lands on one date. Data migration bugs, missed edge cases in business logic nobody documented, integration gaps with systems the legacy app talks to: all of it surfaces at once, in production, after the point where rolling back is still easy. Legacy systems accumulate undocumented behavior for years; a rewrite has to rediscover all of it before cutover, and a rewrite that's chasing requirements nobody wrote down tends to run long, which only grows the gap between what the new system was built against and what the legacy system has since started doing.

That's also why a big bang rewrite is a worse bet the longer it runs. A six-week rebuild of a small, well-understood tool carries the same cutover-risk shape as a two-year rebuild of a core system — but the two-year version has two years for the legacy system's behavior to drift further from what the rewrite assumed.

The two ways a strangler fig migration fails

The strangler fig pattern isn't risk-free — it fails in two specific, predictable ways, and both are visible before you commit to the approach.

No clean interception point

The pattern depends on being able to intercept requests for a given capability and route them to the new service instead of the old one. If the legacy system has no seam to intercept — no API boundary, no routable entry point, logic buried inside a monolith with no clear edge — there's nothing for the facade layer to redirect. Some systems need a thin routing layer built first, before any functionality can move, just to create that seam.

Shared mutable data

If the old and new systems both read and write the same underlying data while the migration is in progress, every piece you move has to solve data consistency, not just functionality. A capability that writes to a shared table has to either keep both systems' writes in sync during the transition or accept inconsistency until the legacy path for that data is fully retired. This is usually the real reason a strangler fig migration stalls for months on one stubborn piece — not the code being replaced, but the data it still shares with everything that hasn't moved yet.

When a big bang rewrite is still the right call

Incremental migration isn't automatically the safer choice. A system small enough, isolated enough, and low-stakes enough that a cutover failure is cheap to recover from is a reasonable candidate for a straight rewrite — an internal admin tool, a single well-bounded service with few integrations, anything where "roll back to the old version for a day" is a real option rather than a crisis. The strangler fig pattern's overhead — building and maintaining a routing layer, running two systems during the transition, coordinating staged releases — isn't free, and for a small enough system it costs more than the risk it's protecting against.

A practical decision framework

SignalFavors
System has clear API or module boundariesStrangler fig
Logic is buried in a monolith with no routable seamsBig bang, or a routing layer built first
Multiple systems share one databaseStrangler fig, with a data-ownership plan per table
System is small, isolated, and low-stakes to roll backBig bang
Business logic is undocumented and the system has run for yearsStrangler fig — a rewrite would have to rediscover it all before cutover
The team can't tolerate running two systems during a transitionBig bang, if the system is small enough for that to be safe

In practice, most systems that prompt a "should we modernize this" conversation are old enough and connected enough to enough other systems that the strangler fig pattern is the lower-risk default. The exceptions are usually smaller than the team expects going in.

How we approach this on real projects

On custom software engagements that start from an existing legacy system, the first deliverable is almost never code — it's a map of the system's actual seams and shared data, because that map is what decides whether strangler fig or a scoped rewrite is the right call for each piece. Modernization timelines vary enormously depending on how coupled the existing system turns out to be once that discovery work is done, so we don't quote a fixed duration before that assessment — it's determined per project, during discovery.

Frequently asked questions

What is the strangler fig pattern?

The strangler fig pattern is an incremental approach to replacing a legacy system: new services are built alongside the old one, and a routing layer directs traffic to the new service for each capability as it's migrated, while the legacy system keeps handling everything not yet moved. Over time the legacy system's footprint shrinks until there's little or nothing left to retire. It's named after the vine that grows around a host tree and gradually replaces it.

What is a big bang rewrite, and why is it considered risky?

A big bang rewrite builds a full replacement system in parallel with the legacy one, then switches everything over in a single cutover. It's considered risky because every migration risk — data bugs, undocumented business logic, integration gaps — surfaces at once in production, at the point where rolling back is hardest, rather than being caught and fixed piece by piece earlier.

When does a big bang rewrite actually make sense?

A big bang rewrite is a reasonable choice for a system that's small, relatively isolated from other systems, and low-stakes enough that a failed cutover is cheap to recover from — for example, an internal tool with few integrations where reverting to the old version for a day isn't a crisis. It's a worse bet the larger and more connected the system is.

What's the biggest reason a strangler fig migration stalls or fails?

Two causes account for most failures: no clean interception point (the legacy system has no API boundary or routable seam for the facade layer to redirect), and shared mutable data (old and new systems both read and write the same underlying tables during the transition, forcing every migrated piece to solve data consistency as well as functionality).

How long does legacy system modernization take?

It depends entirely on how coupled the existing system is — how many other systems share its data, how many integrations touch it, and how much of its behavior is undocumented. That's determined during a discovery and assessment phase before any migration work starts, not from a fixed timeline applied upfront.

Sources

Need help putting this into practice?

Tech Programmer builds and ships this work for startups and enterprises. Tell us what you are trying to do and we will tell you what it takes.

Related reading