What is the strangler fig pattern?

The strangler fig pattern is a migration strategy in which a legacy system is replaced step by step: new features are built in the new system, existing features are moved over one at a time, and the old system is switched off once nothing depends on it.

Category: Architecture

In detail

Named after the strangler fig tree that grows around a host tree until it replaces it entirely, the Strangler Fig Pattern is a proven strategy for modernizing legacy systems without the risk of a 'big bang' rewrite. Instead of replacing the entire system at once, you gradually build new functionality in a modern system while routing traffic through a facade. Over time, more and more requests are handled by the new system until the legacy system can be safely decommissioned. This minimizes risk, allows incremental delivery of value, and keeps the existing system running throughout the migration.

How it works

  1. 1

    Facade Introduction

    A routing layer (API gateway, reverse proxy) is placed in front of the legacy system to intercept all requests.

  2. 2

    Feature Extraction

    Individual features or routes are reimplemented in the new system, one at a time.

  3. 3

    Traffic Routing

    The facade routes requests for migrated features to the new system; everything else goes to legacy.

  4. 4

    Legacy Decommission

    Once all features are migrated, the legacy system is turned off and the facade simplified or removed.

Where it is used

Monolith to Microservices
Gradually extracting services from a monolithic application into independently deployable microservices.
Framework Migration
Moving from an older framework (e.g., AngularJS) to a modern one (e.g., React) page by page.
Database Migration
Transitioning from a legacy database to a modern one by routing reads/writes through a data access layer.

Need help putting this into practice?

Knowing the definition is the first step. Building it into your product is the second, and that is where our engineers help.

Or write to us directly

hello@elitics.io+383 49 171 069

Dukagjini Center, Prishtina, Kosovo