Last Updated: February 3, 2026
Throughout this section on microservices, we have covered patterns for building distributed systems from scratch: service discovery, API gateways, sidecars, service meshes, circuit breakers, and bulkheads.
But what if you are not starting from scratch?
Many organizations have existing monolithic applications, sometimes built over decades, that they want to modernize. The temptation is to stop everything, rewrite the system in a modern architecture, and launch the new version when it is ready. This approach, the "big-bang rewrite," fails more often than it succeeds.
The Strangler Fig pattern offers an alternative. Named after strangler fig trees that gradually envelop and replace their host trees, this pattern enables incremental migration from a legacy system to a new architecture. You replace functionality piece by piece, keeping the old system running until the new one is ready.
In this chapter, you will learn:
The Strangler Fig pattern is one of the most practical approaches for modernizing legacy systems safely.
The idea is tempting. Your legacy system is a mess: hard to understand, impossible to test, built on outdated technology. You imagine starting fresh with clean code, modern frameworks, and proper architecture.
Here is what actually happens:
| Problem | Description |
|---|---|
| Hidden complexity | Legacy systems contain years of edge cases, bug fixes, and business rules that are not documented |
| Moving target | Business does not stop; requirements change while you rewrite |
| No value delivery | Customers get no new features during the rewrite |
| All-or-nothing risk | You only discover if it works when you flip the switch |
| Knowledge loss | People who understood the old system may leave during multi-year rewrite |
| Testing gap | New system has not been battle-tested in production |
Joel Spolsky famously called rewriting code from scratch "the single worst strategic mistake that any software company can make." Netscape's rewrite nearly killed the company. Many others have shared the same fate.