The Strangler Fig Pattern
Blog post from Tyk
The Strangler Fig pattern is a strategic approach for gradually replacing legacy systems by incrementally building a new system around the old one until it is entirely supplanted, akin to how a strangler fig plant envelops a host tree. This method is particularly effective in API management scenarios, where API requests can be intercepted and redirected using API Gateways. The pattern allows for a reduction in risk through incremental releases, demonstrating value earlier with shorter release cycles, and avoiding unnecessary rework by excluding obsolete functionalities. Martin Fowler popularized the concept, emphasizing its suitability for complex systems where direct replacement poses significant risks. The pattern is often applied in transitioning from monolithic to microservices architectures, using proxies to reroute traffic and replace system components gradually. The process involves steps like introducing a proxy, identifying functionalities to replace, building replacement microservices, and eventually decommissioning the old system once all functionalities are migrated. The Strangler Fig pattern also aligns with modern practices like Progressive Delivery, enabling testing and gradual user transition without disrupting existing services.