# Strangler Fig Pattern

An incremental modernization method that routes selected capabilities to new implementations until the legacy system can be reduced or retired safely.

- Type: method
- Domain: Engineering & architecture
- Level: Advanced
- Last reviewed: 2026-09-22
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/strangler-fig-pattern/>)

## What it means

The Strangler Fig Pattern replaces a legacy system gradually rather than through a single rewrite. Teams establish a seam—such as a proxy, routing layer, facade, event feed, or data boundary—then implement one capability outside the old system and redirect relevant traffic to it. Repeating the cycle lets the new system grow around the old one.

## Why it matters

Large rewrites delay value and must chase ongoing business changes while recreating years of hidden behavior. Incremental replacement can deliver improvements earlier, limit each migration step's blast radius, and produce evidence before the next investment. It also allows the existing system to keep serving users while risky or high-value areas move deliberately.

## When to use it

Use the pattern when a valuable legacy system must remain operational and can be divided through workable seams. Prioritize capabilities with clear boundaries, business value, or painful constraints. It is less suitable when no interception point exists, data cannot be separated safely, or a short-lived system can be replaced more cheaply in one step.

## How it works

1. Map users, dependencies, data flows, operational risks, and candidate capability boundaries in the legacy system.
2. Introduce a controllable seam that can direct requests, events, or work to either old or new behavior.
3. Select a bounded slice and define parity, improvement, data, security, and rollback expectations.
4. Build the replacement slice with observability and migration mechanisms, avoiding unnecessary imitation of legacy internals.
5. Route traffic gradually, compare outcomes, resolve discrepancies, and retain a tested fallback while confidence grows.
6. Remove replaced code and dependencies, then repeat until remaining legacy value no longer justifies operation.

## A practical example

An insurer places a facade in front of a policy administration system. It first moves read-only policy documents to a new service, then renewal quotes, using cohort routing and reconciliation reports. Each successful slice removes calls and jobs from the legacy application until only archival access remains and the old runtime can be retired.

## Where it breaks

During migration, the organization operates old and new paths together, increasing cost and cognitive load. Shared databases, duplicated rules, identity, and cross-system transactions can undermine separation. Without explicit retirement milestones, the facade may become permanent middleware and the legacy system may survive indefinitely with even more integrations attached.

## Common mistakes

- Beginning with the most entangled capability instead of proving the migration mechanism on a bounded slice.
- Copying legacy structure and defects into the replacement without reconsidering the domain boundary.
- Running dual systems without reconciliation, observability, rollback, or clear ownership.
- Adding new paths but never deleting replaced code, data flows, infrastructure, or contracts.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/strangler-fig-pattern/#visualization-strangler-fig-pattern>)

## Sources

1. [Strangler Fig](<https://martinfowler.com/bliki/StranglerFigApplication.html>) — Martin Fowler · Original pattern article
2. [The Strangler Fig Pattern](<https://docs.aws.amazon.com/prescriptive-guidance/latest/modernization-aspnet-web-services/fig-pattern.html>) — AWS Prescriptive Guidance · Institutional implementation guide
3. [Cloud Design Patterns, Architectures, and Implementations](<https://docs.aws.amazon.com/en_us/prescriptive-guidance/latest/cloud-design-patterns/introduction.html>) — AWS Prescriptive Guidance · Institutional pattern catalog

## Related topics

- [Microservices Architecture](<https://wiki.soroush.uk/topic/microservices-architecture/>)
- [Modular Monolith](<https://wiki.soroush.uk/topic/modular-monolith/>)
- [Evolutionary Architecture](<https://wiki.soroush.uk/topic/evolutionary-architecture/>)
