Strangler Fig Pattern: How It Works, Examples, and Tools

Replacing a legacy system is difficult when customers still depend on it every day. With a full rewrite, they may see little benefit until the replacement is ready to take over. The strangler fig pattern lets you move one piece of functionality at a time while the rest keeps running.
This guide explains how the routing works, how to keep data in sync, and how to choose the first piece to migrate.
What Is the Strangler Fig Pattern?
The strangler fig pattern is a migration strategy that incrementally replaces a legacy system by routing traffic through a facade to new services, one piece of functionality at a time, until the legacy system can be fully decommissioned. Instead of one risky cutover, the old and new systems run side by side, and the facade decides which one handles each request.
Where the Name Comes From
Martin Fowler named it after strangler figs he saw in Queensland's rain forests in 2001. A strangler fig grows around its host until it can support itself; the host may eventually die. That gradual replacement is the analogy for building a new system around an old one.
His 2004 original was titled "Strangler Application." He later added "Fig" to keep the botanical metaphor clear and avoid the violent connotations of "strangler" on its own. The shorter "strangler pattern" is still common, and it names the same thing.
How the Strangler Fig Pattern Works
Put a facade in front of the legacy back end. It intercepts incoming requests and chooses whether the old application or a replacement service handles each one.
The Facade (Proxy) Layer
Early on, the facade sends most requests to the legacy system. As replacement services become ready, it routes the relevant requests to them instead. An API gateway or reverse proxy can provide this routing layer.
Before moving a route, contract-test the new service against the responses its consumers rely on, including errors. Monitor latency separately: even when the response is correct, the extra routing hop can affect how long it takes.

Incremental Decomposition in Thin Slices
A slice is one piece of functionality that you can move without replacing the whole system. Build it as a new service, then validate it under real traffic before starting the next slice.
Choosing that boundary takes investigation. A slice that looks isolated in code can still have reporting jobs or other consumers missing from the documentation. That is why you should map dependencies before you pick a slice.
Shifting Traffic Safely: Canary Routing, Feature Flags, and Shadow Traffic
Use these techniques to control which requests reach the new service:
- Canary routing sends a small share of a route's traffic to the new service and increases that share as long as error rates stay stable. Istio does it with routing rules that shift a percentage of traffic. An AWS Application Load Balancer uses weighted target groups, but a group with only unhealthy targets gets no automatic failover.
- Feature flags gate the new route per user, tenant, or region, so one cohort goes first. Give each flag a removal date.
- Shadow traffic copies live requests to the new service. Istio sends the mirrored request without waiting for its response and discards that response, so you can capture it at the new service for comparison with legacy. The mirrored requests still run, so mirror reads only, or use a scratch datastore and stub anything that charges, emails, or calls downstream.
A rollback is a one-line routing change only while the legacy system still has current data. Once the new service accepts writes, rolling back also means bringing those writes back.
Decommissioning the Legacy System
The migration ends when nothing depends on the old system, so the legacy component, then the facade, can be retired. Before calling a slice done, check that:
- no live traffic hits the legacy route
- no consumers or reporting jobs still read from it
- historical data has been migrated or archived
- monitoring shows zero usage across a full business cycle
- the rollback window has been closed on purpose
Strangler Fig Pattern vs. Big Bang Rewrite
A big bang rewrite builds the full replacement before switching traffic, concentrating cutover risk in one event.
The strangler fig approach trades cutover risk for coexistence risk. The temporary routing and integration code is extra work that you will later discard. Fowler's argument is that lower migration risk and earlier value justify that cost. We agree, as long as someone is responsible for removing the transitional code.
Strangler Fig Pattern and Microservices
The pattern can support a monolith-to-microservices migration, as in AWS's reference architecture. Splitting services before you understand the domain can lock in costly boundaries. Use domain-driven design to understand the business concepts and event storming to explore where they separate before extracting code.
Skip that work, and your services mirror the old codebase's accidental structure. Use business domains as the basis for drawing service boundaries. If you're still deciding whether microservices are the goal at all, read moving from a monolith to microservices first.
Strangler Fig vs. Anti-Corruption Layer
The facade decides where a request goes. An anti-corruption layer handles a different problem: old and new systems may represent the same business concepts differently. It translates between different domain models and meanings so that one subsystem does not have to adopt the other's meanings.
A migration can use both. Decide whether that translation will still be useful once the migration is finished or whether the layer should be retired too.
Benefits and Challenges of the Strangler Fig Pattern
Benefits include:
- Each release is small enough to test independently and easier to roll back while legacy data stays current.
- New features reach users with each slice, not months later.
- Teams keep shipping other work instead of freezing the roadmap.
- Legacy keeps serving whatever hasn't moved, so there's no all-at-once cutover.
The Facade Can Become a Bottleneck
Requests routed through the facade depend on its availability and capacity, so it can become a single point of failure or a performance bottleneck. Run it as production infrastructure with its own monitoring, capacity planning, and failover.
Data Synchronization Between Old and New Systems
Routing a request does not ensure that both systems have the data it needs. Until a slice is fully cut over, both systems need current data; synchronization introduces another place where the migration can go wrong. Three options are common:
- Change data capture reads the legacy database log and keeps the new store current while the legacy system remains the system of record, as in Microsoft's walkthrough below.
- A synchronizing agent runs the other way. In AWS's example, the new user service publishes each change to a queue, and an agent updates the monolith's database. Use this as a temporary synchronization strategy: the stores are only eventually consistent.
- An outbox table: the service stores each event in the same transaction as the business change, and a separate process publishes it. On the legacy side, that means changing legacy write paths. This event-driven architecture pattern provides eventual consistency.
Keep a path for the new service's writes back to legacy until the rollback window closes, or the legacy tables go stale at cutover and a rollback loses data. Once you remove the legacy tables and sync processes, rollback requires restoring the database objects and replaying the changes they missed.

Stalled Migrations and the People Side
Budget for maintaining both systems if the migration pauses. Changing priorities or stakeholders can halt the work while both systems are still needed. Thoughtworks identifies that hybrid state as a maintenance risk, alongside split staffing and resistance from users or stakeholders.
Fowler argues that migration also requires changes to development practices and organizational relationships; replacing software alone can reproduce the conditions that made the old system brittle. Left untracked, a temporary facade route or sync job tends to outlive its purpose. Give each one an owner and a removal condition, decide whether each ACL stays, and record why each slice was scoped that way.
When to Use the Strangler Fig Pattern (and When Not To)
The strangler pattern earns its overhead when replacing a large or business-critical system in one go is too risky, and the old system can keep running throughout the migration. It is a poor fit when you can't intercept requests, can't modify the legacy code, the system is small enough to replace outright, or you must retire the original quickly
Two questions do most of the work: what would a failed cutover cost, and how well do you know the seams? A costly cutover with known seams favors a strangler fig; unknown seams mean discovery and modularization come first.
How to Implement the Strangler Fig Pattern: A Step-by-Step Example
Suppose you are migrating an e-commerce monolith whose user, cart, and account functions share one database. Cart depends on user data, so the migration order matters. The following hypothetical example extends AWS's guidance with a checkout API and follows the user service through the move.
- Stand up the facade: an API gateway in front of the monolith, routing 100% of traffic to legacy.
- Pick the first slice by dependency order. The user service goes first because cart depends on it; the revenue-critical checkout API waits until its boundaries hold.
- Build the new user service with its own datastore, loaded from the monolith's database and kept current with CDC. Legacy stays the source of truth until cutover.
- Check consumer compatibility with contract tests, add functional and performance tests, and have route-level telemetry live before real traffic moves.
- Shift traffic gradually: a canary share or flagged cohort first, then the whole route. The new service becomes the source of truth, and a queue-fed agent writes its changes back to the monolith, where cart still reads user data.
- Retire the legacy user code and route once the exit criteria are met, but keep the write-back sync until cart moves too.
Strangler Fig Pattern Examples
Retail Coupon System (Thoughtworks)
In Thoughtworks' grocery-retailer case, scarce documentation and tests made the legacy coupon system difficult to change. The team established its behavior with black-box functional tests, then extracted /get_coupons first: it was heavily used but less complex than the other endpoints. An API gateway kept all other requests on legacy.
Decomposing a Shared Database (Microsoft)
Microsoft's reference walkthrough goes domain by domain: ETL moves tables and history to a new database, CDC keeps them current, and consistency is checked before cutover. Legacy tables, stored procedures, and sync processes come out only as a deliberate final step.
Frontend Migration: AngularJS to Angular (Dualboot)
Dualboot Partners has published two case studies of moving AngularJS applications to Angular 18 incrementally, for a learning platform serving professional sports organizations and a real estate investment firm. In the first, load balancers split users between old and new versions.
Tools That Support the Strangler Fig Pattern
The strangler pattern combines tools with different jobs:
AWS's reference design uses API Gateway as the proxy through Migration Hub Refactor Spaces. That service closed to new customers on November 7, 2025, and AWS now points to AWS Transform.
Deciding and Governing Strangler Fig Migrations with Catio
Sequencing slices across a large, poorly documented estate is the layer we work on.
Our Architecture IDE doesn't route traffic or write services; your gateway, mesh, and coding tools still do that. Our Loop maps onto the migration: understand the current system, decide which slice goes next, design its target state, then execute in your own tools. We don't replace coding IDEs. We define what they execute.

Take the example monolith. Stacks diagrams are built from the integrations you connect, helping you investigate the running system's dependencies and which components a change could affect. Ask Archie, our reasoning agent, whether user, cart, or checkout should move first, and review the trade-offs in its answer.
The chosen slice becomes a Blueprint with a target state, gap analysis, and implementation plan. Add it to a Plan with an owner and a place in the sequence. When a developer picks it up, the Catio MCP server brings that spec into Claude Code or Cursor.
We estimate 5 minutes to a decision-grade system view and 2 to 3 hours to a modernization plan. We currently support onboarding for AWS estates at companies past the early-stage startup phase.
After each slice, compare what's running against the design you committed to, so leftover facade routes and sync jobs show up before they become permanent. Treat each slice as part of the wider legacy system modernization program.
Conclusion
Choose slices after mapping their dependencies, and give transitional routes and synchronization jobs explicit removal conditions. For a larger modernization program, start with a modernization roadmap. For the dependency side at scale, our podcast episode on re-architecting the stack for the AI era gets into hard versus soft dependencies.
To work out which slice of your own system should go first, sign up for Catio and connect your AWS estate.
FAQ
What are the benefits of using the strangler fig pattern?
Smaller releases that are easier to roll back while legacy data stays current, value with each slice, and no all-or-nothing cutover.
What are the challenges of using the strangler fig pattern?
A facade bottleneck, error-prone data sync, and stalled migrations that can leave a hybrid system harder to maintain.
How does the strangler fig pattern relate to microservices architecture?
It's a common way to break up a monolithic application incrementally. It won't set service boundaries for you.
What is the strangler fig pattern in one sentence?
A facade routes traffic between old and new systems while functionality moves over piece by piece.
Why is it called the strangler fig pattern?
Strangler figs grow around a host tree until they stand on their own. Fowler added "Fig" to his original "Strangler Application" title because "strangler" alone had violent connotations.
Who introduced the strangler fig pattern?
Martin Fowler, in a 2004 blog post, after seeing strangler figs in Queensland in 2001.
What tools support the strangler fig pattern?
Gateways or reverse proxies, a service mesh, feature flags, change data capture, contract tests, observability, and architecture tooling.


