Incremental migration strategy that gradually replaces a legacy system with new components, progressively routing traffic until the old system can be retired.
The Strangler Fig pattern (named after the strangler fig tree) is a strategy for migrating legacy systems incrementally. Instead of a complete rewrite — the dreaded "big bang" that fails more often than it succeeds — new components are built that gradually replace functionality from the old system while it continues operating.
Martin Fowler described it in 2004, inspired by the strangler figs of Australia: seeds that germinate in the canopy of a host tree, grow roots downward, and eventually envelop and replace the original tree.
Complete rewrites are the graveyard of software projects. The Strangler Fig pattern offers a pragmatic alternative:
| Variant | Mechanism | When to use |
|---|---|---|
| Strangler Fig (classic) | HTTP proxy gradually redirects traffic | Migrating web monolith to microservices |
| Branch by Abstraction | Internal code abstraction | Replacing internal components without changing the API |
| Parallel Run | Run both systems and compare | When correctness is critical (payments, calculations) |
| Feature Toggle | Feature flags control which users see the new system | Gradual migration by user segment |
Architectural style structuring an application as a collection of small, independent, deployable services, each with its own business logic and data.
Pattern providing a single entry point for multiple microservices, handling routing, authentication, rate limiting, and response aggregation.
Architectural pattern isolating business logic from the outside world through ports and adapters, facilitating testing and technology changes.
Set of technical and cultural practices that implement DevOps principles — from Infrastructure as Code to blameless post-mortems. The "how" behind the philosophy.