Strangler fig pattern
Replacing a legacy system piece by piece, routing one feature at a time to new code until the old system can be switched off.
Martin Fowler named it after the fig vine that grows around a host tree until it stands on its own. A proxy or router sits in front of the old system; each migrated feature is served by the new code, the rest still goes to the old one. Users keep working the whole time, and every step can be rolled back, unlike a big-bang rewrite that delivers nothing until the end.
Sources
- Martin Fowler: Strangler Fig martinfowler.com
Related terms
- Technical debt: Shortcuts in code and design that speed up delivery now and make every later change slower until they are paid back.
- Blue-green deployment: Two identical production environments: the new version goes to the idle one, then traffic switches over, and back if something breaks.
- Function point: A unit of software size based on what the system does for users, independent of the programming language.
- Anti-corruption layer (ACL): A translation layer between your model and a legacy or external system, so its data shapes and quirks do not leak into your code.
- Modular monolith: One deployable application split inside into modules with clear boundaries, each owning its data and using the others only through defined interfaces.
- Parallel run (shadow traffic): Running the old and new implementation side by side on real requests, using the old result and comparing the new one, before switching over.
- Branch by abstraction: Replacing a component inside a codebase step by step: put an interface in front of it, build the new version behind it, switch, then delete the old one.
- System of record (source of truth): The one system whose copy of a piece of data wins when copies disagree; all other copies are derived from it.
- Dual-write problem: Writing one change to two systems, such as a database and a broker or an old and a new store, without a shared transaction, so they can drift apart.
