# Strangler Fig Pattern

URL: https://eoxlabs.dev/glossary/strangler-fig-migration
Last updated: 2026-11-26
Publisher: EOXLABS (https://eoxlabs.dev)

Section: [Glossary](https://eoxlabs.dev/glossary)

The strangler fig pattern replaces a legacy system gradually: a façade sends each request to the old system or to new services, and functionality moves to the new side piece by piece until the old system can be switched off. Martin Fowler took the name from a fig that grows on a host tree until the host may die.

## Why not rewrite the system all at once?

Because the all-at-once rewrite usually fails. In his article [Strangler Fig](https://martinfowler.com/bliki/StranglerFigApplication.html), Fowler writes that it is easy to think of the exercise as a simple replacement, and that "we've seen this simple-sounding plan go down in flames most of the time." His reasons: "Replacing a serious IT system takes a long time, and the users can't wait for new features", the details of existing behavior are hard to pin down, and much of that behavior "isn't really wanted".

Microsoft's Azure Architecture Center describes the alternative in its [Strangler Fig pattern](https://learn.microsoft.com/en-us/azure/architecture/patterns/strangler-fig) guide: replace specific pieces of functionality incrementally, while "customers continue to use the same interface and are unaware that a migration is in progress."

## How does EOXLABS run a strangler fig migration at the edge?

A Cloudflare Worker placed in front of the legacy origin makes a natural façade. It already receives every request at the nearest point of presence, so a routing table can decide per path, per tenant or per share of traffic which side answers.

1. **Route everything to the old system first.** The façade goes live doing nothing but passing traffic through and logging it.
2. **Move one slice.** A route with clear boundaries, such as sign-in or a read-only catalog, is rebuilt edge-native and switched over.
3. **Compare before trusting.** Where it is safe, the new path runs in shadow and its answers are compared with the old system's.
4. **Roll back by routing.** If the new slice misbehaves, one routing change sends traffic back to the legacy path.
5. **Retire the old code**, slice by slice, and finally the façade itself if it is no longer needed.

This is the shape of EOXLABS's [legacy-to-edge migration work](https://eoxlabs.dev/capabilities/legacy-to-edge-migration), and it fits Maintain On Course, the way to start for existing systems that need to be reimplemented. The engineering note on [moving a monolith to the edge](https://eoxlabs.dev/engineering/monolith-to-edge-migration) goes deeper.

## What makes the data side hard?

Code moves more easily than data. Microsoft's example extracts one domain's tables at a time: an initial load, then change data capture to keep the new database in step, validation before cutover, and removal of the old tables only once the new system is the system of record. While both copies exist, the new database is eventually consistent with the old one, and the design must say which side wins during that window.

## When is the pattern a poor fit, and what is it confused with?

Microsoft lists cases where it may not suit: when requests to the back end cannot be intercepted, when the system is small enough to replace whole, or when the original must be decommissioned quickly. It also warns that the façade must not "become a single point of failure or a performance bottleneck."

- **Blue-green deployment** swaps one whole version for another. The strangler fig swaps pieces over months.
- **An anti-corruption layer** translates between old and new models. Microsoft recommends one alongside the façade so legacy conventions do not leak into the new design.

Related migration terms are in the [EOXLABS glossary](https://eoxlabs.dev/glossary).

## Related

- [Migrating a monolith to the edge without downtime](https://eoxlabs.dev/engineering/monolith-to-edge-migration): Move a server-rendered monolith to an edge stack one route at a time, behind a Worker façade, with shadow comparison, single-writer data ownership and a rollback at every step.
- [Legacy-to-Edge Migration](https://eoxlabs.dev/capabilities/legacy-to-edge-migration): Maintain On Course: EOXLABS migrates live systems to Cloudflare's edge one route at a time, keeps the existing database reachable through Hyperdrive, and keeps every step reversible.
- [Edge-Native](https://eoxlabs.dev/glossary/edge-native): Edge-native describes software built for a distributed edge network from its first line, so requests are handled in the data center that receives them rather than sent to a central origin.
- [Eventual Consistency](https://eoxlabs.dev/glossary/eventual-consistency): Under eventual consistency, replicas may briefly disagree after a write but converge if updates stop. It buys speed and availability at the cost of stale reads in between.

## More glossary

- [Connection Pooling](https://eoxlabs.dev/glossary/connection-pooling)
- [PHI (Protected Health Information)](https://eoxlabs.dev/glossary/phi)
