Strangler Fig
Incrementally replace a legacy system behind a routing facade.
AdvancedPlatform
A facade routes each request to the legacy system by default, redirecting individual routes to a new implementation as they're rebuilt -- until nothing routes to the legacy system anymore and it can be switched off.
When to use it
- A legacy monolith is too risky to replace in one big-bang rewrite
- Individual capabilities can be peeled off and rebuilt independently over time
Trade-offs
- Runs legacy and new systems side by side for an extended migration period
- The facade must keep behavioural parity for routes not yet migrated
Components used
Single-Page AppReverse ProxyVirtual MachineContainer Service
How it works
- A routing facade is placed in front of the legacy system, initially forwarding everything unchanged.
- Functionality is replaced one slice at a time, with the facade redirecting those routes to new services while everything else still reaches the legacy system.
- The legacy system shrinks until nothing routes to it and it can be switched off.
Used in the wild
- Decomposing a monolith without a risky big-bang rewrite.
- Replacing a vendor system incrementally while it remains in production.
- Modernising a platform that cannot afford a feature freeze.
Good to know
- Martin Fowler named it after the strangler fig, which grows around a host tree and eventually stands alone once the host decays.
- The failure mode is stopping halfway. Many organisations end up permanently maintaining both systems plus the facade, which is worse than either alone.
Related patterns
Model Serving with A/B Testing
Route inference traffic across model versions to compare live performance.
CQRS
Separate models and stores for writes and reads.
Blue-Green Deployment
Run two full production environments, switch traffic between them.
Canary Release
Send a small slice of traffic to the new version before a full rollout.