SEOArticleAugust 3, 2026

Strangler Fig Pattern: A Pragmatic Guide for Engineering Leaders

Strangler Fig Pattern: A Pragmatic Guide for Engineering Leaders The strangler fig pattern, coined by Martin Fowler , is an architectural approach to incrementally replacing legacy system functionality through a façade or proxy that routes traffic to new components until the o...

Jaxon Avery
Jaxon Avery
21 min read
Strangler Fig Pattern: A Pragmatic Guide for Engineering Leaders primary image

Strangler Fig Pattern: A Pragmatic Guide for Engineering Leaders

The strangler fig pattern, coined by Martin Fowler, is an architectural approach to incrementally replacing legacy system functionality through a façade or proxy that routes traffic to new components until the old system can be safely decommissioned. The name comes from the strangler fig tree, which grows around a host tree, gradually taking over until the original host is gone. In software, the mechanism is the same: wrap, redirect, replace, retire.

Three concepts anchor the pattern: a façade that intercepts all traffic, incremental extraction of features into new services, and a decommission gate that confirms the legacy system is no longer needed. Use it when:

  • A big-bang rewrite carries unacceptable delivery or business risk

  • The system must keep serving production traffic throughout migration

  • Feature delivery cannot pause for months while a rewrite completes

  • The Azure Architecture Center and AWS Prescriptive Guidance both recommend it for phased cloud migration of monolithic applications

Ridiculous Engineering applies this pattern on modernization engagements where the cost of getting it wrong is high and the tolerance for downtime is low.

Table of Contents

Why teams choose the strangler fig pattern over a full rewrite

Legacy systems fail teams in predictable ways. The codebase is fragile, test coverage is thin, and the engineers who understood the original design have moved on. A full rewrite sounds appealing until the first estimate lands and the business realizes it means six to eighteen months of parallel investment with zero new features shipped.

The specific problems that push teams toward incremental modernization:

  • Fragile monoliths where a change in one module breaks unrelated functionality

  • Knowledge gaps in older languages (COBOL, PowerBuilder, early Java EE) that make confident refactoring nearly impossible

  • Regulatory and uptime constraints that prohibit extended maintenance windows

  • Continuous delivery requirements where product roadmaps cannot pause for a rewrite

  • Cost and time risk on large rewrites, which frequently exceed budget expectations by a significant margin

Martin Fowler’s original framing captures the core tradeoff well:

That risk reduction is the primary business driver. Fowler’s recommended approach prioritizes steady, visible returns over a single launch event. For a CTO defending a modernization budget to a board, “we shipped three new features this quarter while migrating the order service” is a far easier conversation than “we’ll have something to show you in Q4 of next year.”

How the strangler fig pattern works at the architecture level

The architecture is conceptually simple. Every client request passes through a strangler façade, which is typically an API gateway, reverse proxy, or purpose-built routing layer. The façade inspects each request and routes it to either the legacy system or the new service, depending on which features have been migrated.

Hand placing modular block representing system migration

The flow looks like this: client → strangler façade → legacy monolith (for unmigrated features) or new microservice (for migrated features). The legacy system and new services coexist during the migration period. Nothing in the client changes.

Key responsibilities of the façade:

  • Request routing based on path, header, tenant, or feature flag

  • Anti-Corruption Layer (ACL) translation between legacy data models and new service contracts, as documented by the Azure Architecture Center

  • Telemetry and usage logging to measure which legacy endpoints are still active

  • A/B and canary routing to gradually shift traffic percentages to new services

The Wikipedia entry on the pattern notes that it applies at multiple granularities, from wrapping a single method to migrating an entire application. That flexibility is what makes it practical: you do not have to commit to a full microservices architecture on day one.

Pro Tip: Instrument the façade before you extract a single feature. Usage telemetry from the first week will tell you which endpoints are called most frequently, which are called by only one client, and which have not been touched in months. That data drives your extraction priority list and often surfaces dead code you can simply delete.

Concrete implementation techniques and components

Getting the façade in place is the easy part. The engineering complexity lives in routing logic, data synchronization, and keeping the two systems behaviorally consistent during coexistence.

Core components

  1. Strangler façade (API gateway or reverse proxy): NGINX, AWS API Gateway, Azure API Management, or a custom routing service. This is the single entry point for all traffic.

  2. Anti-Corruption Layer (ACL): A translation layer that converts legacy data models and semantics into the new service’s domain model. Design ACLs with explicit translation rules and a decommission plan from the start.

  3. Service adapters: Thin wrappers that allow the new service to call legacy APIs or databases without importing legacy logic.

  4. Feature flags: Runtime switches (LaunchDarkly, Unleash, or a homegrown flag store) that control which users or tenants route to the new service.

  5. Intercept points: Hooks inside the monolith that allow the façade to capture events or data changes without modifying core legacy logic.

Routing techniques

  • Path-based routing: Route /orders/v2/* to the new service, /orders/* to legacy.

  • Header or tenant routing: Route specific tenants or API clients to the new service for early adopter testing.

  • Feature-flag-driven routing: Gradually shift a percentage of traffic (1%, 10%, 50%, 100%) using a flag store.

  • Canary releases: Route a small slice of production traffic to the new service and compare error rates and latency before widening the rollout.

Data migration and synchronization

Data is where most strangler migrations slow down. The options, roughly in order of complexity:

  • Dual-write: The application writes to both the legacy database and the new data store simultaneously. Simple to implement, but write failures require careful reconciliation logic.

  • Change-data-capture (CDC): Tools like Debezium stream row-level changes from the legacy database to the new service in near real time. Prefer CDC for write-heavy systems where dual-write latency is unacceptable.

  • Event sourcing: Replay domain events to rebuild state in the new service. Powerful but requires the legacy system to emit clean events.

  • Bulk backfill: One-time historical data migration, typically run before go-live and reconciled against CDC deltas.

Pro Tip: For non-critical read paths, eventual consistency is usually acceptable. Reserve the complexity of synchronous dual-write for financial transactions, inventory counts, and any data where a stale read has a real business consequence.

Testing and monitoring checklist

  • End-to-end tests that exercise both the legacy and new code paths through the façade

  • Contract tests between the façade and each downstream service

  • Canary dashboards tracking error rate, p95 latency, and business-metric parity

  • Alerts on behavioral drift: if the new service returns different results than legacy for the same input, you want to know before users do

A phased playbook from discovery to decommission

Phase Key Activities Roles Success Gate
1. Discovery Inventory endpoints, map dependencies, instrument telemetry Architect, Data Engineer Dependency map complete; top 10 endpoints by call volume identified
2. Identify seams Define service boundaries, identify ACL translation points Architect, Product Owner Bounded contexts documented; ACL schema drafted
3. Build façade and ACL Deploy routing layer, implement ACL, validate parity Architect, SRE 100% of traffic flows through façade with no regression
4. Extract first feature Migrate one low-risk, high-value endpoint to new service Engineering team, QA New service handles target endpoint; error rate matches legacy baseline
5. Route and monitor Shift traffic incrementally using feature flags and canary SRE, Migration Lead p95 latency within 10% of legacy; zero data inconsistency alerts
6. Iterate and scale Repeat extraction for remaining features in priority order Full team Each extracted feature passes contract tests and canary gate
Decommission legacy Confirm zero incoming calls, transfer data ownership, archive Architect, Data Engineer, SRE No traffic to legacy for 30 consecutive days; data parity confirmed; rollback plan documented

Flowchart infographic of strangler fig migration phases

The decommission gate deserves emphasis. A legacy module is not ready to retire until three conditions are met: no incoming calls for a defined period (30 days is a reasonable minimum), confirmed data ownership transfer to the new service, and historical data archived or migrated with a verified read path. Skipping any of these creates the worst outcome: a “decommissioned” system that quietly still serves traffic.

For timeline expectations, a small scope typically runs a few months, a medium scope like a full domain takes under a year, and a large scope involving full monolith decomposition is a long multi-year program, as Fowler’s guidance explicitly acknowledges.

What a real migration looks like: the order service

A common starting point for strangler migrations is the order service in a retail or SaaS monolith. Here is the migration sequence:

  • Step 1 — Extract the read model: Build a new order-query microservice that reads from a replicated copy of the legacy orders table. Route all GET /orders/* requests through the façade to the new service. Legacy handles all writes.

  • Step 2 — Add façade routing for order endpoints: Deploy the API gateway façade. Confirm 100% of order traffic flows through it with no latency regression.

  • Step 3 — Implement the ACL: The legacy order model likely has denormalized fields, status codes as integers, and customer IDs that map to a different schema. The ACL translates these before the new service ever sees them.

  • Step 4 — Migrate write flows with CDC: Stand up Debezium (or equivalent) to stream order writes from the legacy database to the new service’s event log. Validate data parity between both stores.

  • Step 5 — Validate and canary: Route 5% of write traffic to the new service. Monitor for order-count discrepancies, failed state transitions, and downstream notification failures.

  • Step 6 — Cutover and decommission: Shift 100% of traffic to the new service. Monitor for 30 days. Decommission legacy order tables after confirming zero direct reads.

The architecture during coexistence: client → API gateway façade → legacy monolith (writes, initially) and new order microservice (reads, then writes). Both services share a CDC replication stream during the transition. The Azure Architecture Center’s downloadable diagrams illustrate this phased routing clearly.

Migration phase Legacy handles New service handles Validation check
Read extraction All writes, all reads Order reads (GET) Data parity on read results
Write migration (canary) 95% of writes 5% of writes Error rate, order-count parity
Full cutover Nothing All order traffic 30-day zero-traffic confirmation
Decommission Archived All order traffic Data ownership transferred

Pro Tip: Run the enterprise migration checklist for any customer-facing endpoints that affect SEO or public URLs. A strangler migration that changes URL structures without proper redirects can damage organic traffic as badly as a botched rewrite.

Tradeoffs, pitfalls, and when not to use this pattern

The strangler fig pattern is not universally the right choice. Used carelessly, it creates its own class of problems.

Risks and mitigations:

  • Routing complexity: The façade becomes a critical path dependency. Mitigate with circuit breakers, health checks, and a tested fallback to legacy for every route.

  • Data consistency challenges: Dual-write and CDC both introduce windows of inconsistency. Teams commonly underestimate the engineering effort required to keep databases synchronized.

  • Façade as bottleneck: A poorly sized API gateway adds latency to every request. Performance-test the façade under production load before routing real traffic.

  • Long-lived coexistence costs: Running two systems in parallel doubles operational overhead. Budget for this explicitly; some legacy modules may never justify full migration and should be isolated behind the façade indefinitely.

  • Hidden coupling: Legacy systems often have undocumented side effects (audit triggers, batch jobs, downstream integrations) that only surface after extraction. A thorough discovery phase catches most of these.

Quick decision checklist — use the strangler fig pattern when:

  1. The system must remain live throughout migration (no maintenance windows)

  2. A big-bang rewrite would take more than 6 months and block feature delivery

  3. You can define clear service boundaries or seams in the existing codebase

  4. The team has capacity to operate two systems in parallel

  5. Data migration complexity is manageable with CDC or dual-write

Do not use it when:

  1. The legacy system has no identifiable seams (a true “big ball of mud” with no domain boundaries)

  2. The team lacks the SRE capacity to monitor two systems simultaneously

  3. The migration scope is so small (a single microservice with clean APIs) that a direct replacement is lower risk

  4. Regulatory constraints prohibit running legacy and new systems in parallel

For teams dealing with legacy system integration challenges more broadly, the pattern is one tool in a larger modernization toolkit, not a universal answer.

Ridiculous Engineering runs strangler fig migrations end to end

Most teams have the intent to modernize incrementally. Fewer have the architecture experience, data engineering depth, and SRE capacity to execute it without the migration dragging on for years or the façade quietly becoming the new legacy system.

Ridiculous Engineering’s custom software development practice runs strangler fig engagements from discovery through decommission: dependency mapping, façade and ACL design, CDC pipeline setup, canary rollout management, and long-term support once the new services are live. We bring measurable gates to every phase so you know exactly when a feature is ready to cut over and when the legacy module is safe to retire. If you have a monolith that needs to move and a business that cannot stop while it does, schedule a discovery engagement with our team.

Key Takeaways

The strangler fig pattern is the right choice when a big-bang rewrite is too risky, the system must stay live, and you can define clear seams in the existing codebase.

Point Details
Instrument before you extract Deploy the façade and add telemetry first; usage data drives extraction priority.
ACLs prevent legacy contamination Design Anti-Corruption Layers with explicit translation rules and a decommission plan from day one.
Data sync is the hard part CDC-based replication handles write-heavy systems; dual-write suits simpler flows but requires reconciliation logic.
Decommission has a hard gate No legacy traffic for 30 consecutive days plus confirmed data parity before retiring any module.
Ridiculous Engineering Runs end-to-end strangler fig engagements with measurable phase gates, ACL design, and CDC pipeline setup.

Useful sources and further reading

  • Martin Fowler — StranglerFigApplication: The origin of the pattern, the metaphor, and the core risk-reduction rationale. Start here.

  • Azure Architecture Center — Strangler Fig Pattern: Phased routing diagrams, ACL guidance, and implementation caveats from Microsoft’s cloud architecture team.

  • AWS Prescriptive Guidance — Strangler Fig: Routing and ACL use cases with cloud-native implementation notes; covers dual-write and CDC approaches.

  • Wikipedia — Strangler Fig Pattern: Concise reference covering granularity options and usage logging as a migration tool.

  • Ridiculous Engineering — Legacy System Integration: Practical patterns for non-disruptive modernization from the Ridiculous Engineering team.

  • Ridiculous Engineering — COBOL Modernization Costs: Budget and timeline lessons from legacy language modernization projects.

FAQ

What is the strangler fig pattern in software architecture?

The strangler fig pattern is an approach to incrementally replacing a legacy system by routing traffic through a façade to new services, one feature at a time, until the legacy system can be decommissioned. Martin Fowler coined the term, drawing on the biology of the strangler fig tree.

How is the strangler fig pattern different from a big-bang rewrite?

A big-bang rewrite replaces the entire system at once, blocking feature delivery and concentrating all risk into a single launch. The strangler fig approach migrates one feature at a time, ships value continuously, and allows rollback at any stage.

What is an Anti-Corruption Layer and why does it matter?

An Anti-Corruption Layer (ACL) is a translation component that converts legacy data models and semantics into the new service’s domain model, preventing legacy design decisions from leaking into the new system. Without it, new services tend to inherit the same structural problems as the system they are replacing.

How long does a strangler fig migration typically take?

Timeline depends on scope: a small migration typically runs a few months, a full domain like an order service runs under a year, and a full monolith decomposition is a long multi-year program.

When should you not use the strangler fig pattern?

Avoid it when the legacy system has no identifiable seams, when the team lacks SRE capacity to run two systems in parallel, or when the migration scope is small enough that a direct replacement carries less risk than building and maintaining a façade.

The letters S.E.O made o=up of illustrated cogs and gears.
SEO

Article

How to Choose Keywords That Really Boost Your SEO

Choosing the right keywords is essential for driving targeted traffic and improving your website’s SEO. Here’s how to select SEO keywords that truly make an impact.

Ridiculous EngineeringSep 17, 2024
A light from below hand floating over a search box interface and various icons beneath the search interface.
SEO

Article

Staying Ahead in the SEO Game: What You Need to Know for Your eCommerce Success

How do eCommerce businesses need to adapt to the latest SEO trends to stay ahead of the competition? This article explores key trends including AI-driven SEO, voice search optimization, Core Web Vitals for user experience, video SEO, and the importance of building trust through E-E-A-T (Experience, Expertise, Authoritativeness, Trustworthiness).

Ridiculous EngineeringSep 3, 2024
A finger pinting to a holographic button and smiley faces floating to the right of the finger.
SEO

Article

The Intersection of UX and SEO in Ecommerce Design

Balancing user experience (UX) and search engine optimization (SEO) is essential for any successful ecommerce platform. At Ridiculous Engineering, we specialize in seamlessly integrating UX and SEO to create ecommerce sites that are not only user-friendly but also highly discoverable.

Ridiculous EngineeringSep 12, 2024

Embrace Technology with Confidence

Your Guide to Successful Technology Adoption

If you are looking for a guide in adopting technology, a technology switch, or how to best apply new technology in your business, we at Ridiculous Engineering are here for you. Reach out today to learn how we can help.