Strangler Fig Pattern
Explore the Strangler Fig pattern to understand how to safely migrate legacy monolithic systems into microservices incrementally. Learn how to identify functional seams, implement routing facades, and shift traffic gradually while maintaining system availability and reducing migration risks. This lesson helps you apply practical steps and real-world strategies for smooth legacy modernization.
In the previous lesson, we explored how caching layers optimize data access in modern architectures. But migrating a legacy system to actually leverage those patterns demands more than ambition. It demands a safe, incremental strategy rather than a risky big-bang cutover.
The Strangler Fig pattern fills in that gap. Borrowed from a biological metaphor, it enables teams to decompose monolithic legacy systems into modern services one capability at a time, maintaining production availability throughout the entire transition.
Origin and concept of the pattern
The strangler fig tree in tropical forests germinates in the canopy of a host tree, sending roots downward that gradually envelop the host’s trunk. Over time, the fig assumes the structural role of the host, which eventually decomposes and disappears. The fig stands independently where the host once was.
This maps precisely to software migration. The legacy system is the host tree. New microservices or modules are the fig’s roots growing around it. A
Martin Fowler coined three core phases for this pattern:
Transform involves building the new component alongside the legacy system. ...