<arch.design/>
Principles/Strangler Fig Pattern
SystemArchitectureintermediate2004migrationlegacyincrementalmartin-fowler

Strangler Fig Pattern

Incrementally replace a legacy system by building the new system alongside it, routing traffic over gradually until the old system is retired.

3/5
Operates at: System level

System topology — how multiple services are organised

How it works

Named by Martin Fowler after a parasitic fig tree that grows around its host, the Strangler Fig pattern allows safe incremental migration from a monolith to microservices.

A facade (often an API Gateway or proxy) sits in front of the legacy system. New functionality is built as new services. The proxy routes requests to either the legacy system or a new service. Over time, more and more routes are migrated until the legacy system handles nothing and can be decommissioned.

This avoids the 'big bang' rewrite that historically fails.

Why it matters

Big-bang rewrites carry enormous risk. The Strangler Fig pattern is the industry-standard strategy for safely migrating from a legacy monolith.

When to use

  • Migrating from a legacy monolith to microservices
  • When the legacy system cannot be taken offline for rewrite
  • Feature-by-feature migration with business continuity

When NOT to use

  • When the legacy system is too entangled to proxy safely
  • Greenfield projects — no legacy to strangle

Trade-offs

+

Low risk — incremental, reversible migration

Running two systems simultaneously increases operational cost

+

Business continuity during migration

Proxy adds a network hop and potential bottleneck

In production

Amazon

Strangler Fig used to decompose original retail monolith

LinkedIn

Gradual replacement of monolith with services over several years

Industry adoption

3/5Common in specific contexts — used when the problem fits.

Related principles