The Strangler Fig Pattern: Migrating Legacy Systems Without the Big Bang

2026-05-02

You've inherited a monolithic legacy system that needs to be replaced. Management wants a rewrite. Your instinct says "let's rebuild it from scratch." Stop right there. Full rewrites are where projects go to die. The Strangler Fig pattern gives you a safer path.

Named after strangler fig trees that grow around a host tree and gradually replace it, this pattern works by incrementally replacing pieces of a legacy system while keeping it running. No big bang cutover. No "we'll launch the new system in six months" promises that turn into two years.

How it works in practice:

Real-world example: Suppose you have a legacy PHP monolith handling orders, inventory, users, and reporting. You stand up an Nginx reverse proxy in front of it. You rebuild the reporting module as a new service. You update Nginx so that /api/reports/* routes to the new service while everything else still hits PHP. Users notice nothing. You now have a proven migration path and can tackle inventory next.

Choosing what to migrate first matters. A good rule of thumb: pick the component with the highest change frequency and lowest coupling to the rest of the system. If a module changes 3x more often than average but only shares a database table or two with other modules, it's a strong candidate. High-churn, low-coupling components give you the most return on migration effort with the least risk of breaking something.

Common pitfalls:

See it in action: Check out Strangler Fig Pattern: Migrate Legacy Systems Without Downtime (Step-by-Step) by Sunsetting AI to see this theory applied.
Key Takeaway: Replace legacy systems incrementally behind a routing facade — each small migration delivers value and reduces risk, while a full rewrite gambles everything on a single cutover.

All newsletters