Architecture Library

Strangler Fig Pattern

3–5 minutes
808 words

Replace a system gradually, one capability at a time, behind a shared interface, until the old system can be switched off.

Problem

An important system has become hard to support and change, and needs replacing. But it runs core parts of the business, holds years of rules and data, and cannot simply be stopped. Replacing it in one go, a big-bang migration, means a long build with nothing delivered until the end, and all of the risk concentrated in a single switchover.

Context

The pattern fits when:

  • the existing system still works and the business depends on it day to day;
  • it does more than anyone has fully documented, so a complete rewrite is likely to miss things;
  • its work can be split into capabilities that can be moved separately, such as order handling, pricing or invoicing;
  • requests to it can be intercepted at a clear point, such as a user interface, an API or a set of integrations.

Solution

The name, described by Martin Fowler, comes from the strangler fig: a plant that grows around a host tree until it can stand on its own and the host is no longer needed.

  1. Put a facade in front of the old system. All clients and integrations go through a routing layer, such as an API or gateway, instead of connecting to the old system directly. At first, the facade simply passes everything through.
  2. Build the replacement for one capability. Choose a capability that delivers value, or reduces risk, and is reasonably self-contained.
  3. Redirect that capability. Change the facade so requests for that capability go to the new service. Clients don’t notice the switch.
  4. Repeat. Move further capabilities, one at a time, learning from each step.
  5. Retire the old system. When nothing routes to it any more, switch it off and remove the facade’s legacy routes.
Part-way through a strangler fig migration. Order handling has moved to the new service; pricing and invoicing are still in the legacy system. See the ArchiMate Notation Key for how to read the diagram.

Each step leaves the business in a stable, working state, so the migration can be planned as a series of transition architectures.

Trade-offs

BenefitsCosts and risks
Risk is spread over many small switchovers instead of one large oneOld and new systems run side by side for a long time, with the cost of supporting both
Value is delivered early, with each capability movedThe facade is an extra component that must be built, secured and kept reliable
Each step can be tested and, if needed, reversedData shared between old and new has to be kept consistent while both are in use
The team learns how the old system really works as it goesMigrations can stall part-way, leaving two systems running indefinitely

Data is usually the hardest part. At first, the new service may need to read from, or write to, the old system’s database. Over time, ownership of each piece of data moves to the new side, often with a period of synchronisation in between. Planning which system owns which data, and when that changes, is as important as planning the functionality.

When to use it, and when not to

Use it when:

  • the system is large, business-critical and cannot be stopped for a long changeover;
  • requests can be intercepted and routed at a clear point;
  • the replacement will be built or adopted over months or years.

Consider something else when:

  • the system is small enough to replace safely in one step;
  • there is no practical point at which to intercept requests;
  • the old system must be removed urgently, for example because its platform is failing, where moving it to a supported platform first may be the safer step;
  • the whole system is being replaced by an off-the-shelf product that cannot run alongside it, where a well-rehearsed cut-over may be more realistic.

Related patterns

  • Anti-Corruption Layer – a translation layer that keeps the old system’s data model from leaking into new services. Often used alongside a strangler fig.
  • Parallel Run – running old and new logic side by side and comparing results before switching, useful for high-risk capabilities such as pricing.
  • Branch by Abstraction – a similar step-by-step approach applied within a codebase rather than between systems.
  • API Gateway – a common way to implement the routing facade.
  • Change Data Capture – streaming changes out of the old database, to keep new services in sync during the migration.

Example

The Architecture in Practice case study on modernising the dispatch system at ExampleCo – Logistics uses the strangler fig pattern: it wraps the legacy system behind an API, moves capabilities out over three transitions, and retires the old system at the end.

Further reading

Last reviewed: November 2026