
Use the strangler pattern migration approach when you need to replace a large, business-critical monolith without downtime: introduce a routing façade, extract one bounded context at a time, and validate each slice with shadow traffic before cutting over. The trade-off is real. You trade a faster big-bang timeline for a longer, safer one with dual-run overhead, but you get incremental value, a working rollback path, and none of the all-or-nothing risk of a single cutover weekend.
TL;DR:
The initial façade must be an operational, version-controlled routing layer that directs traffic without altering requests; skipping this can cause complex rollback issues later.
Implementing an anti-corruption layer and feature flags with clear ownership and expiration dates prevents legacy quirks from contaminating the new system and avoids permanent scaffolding.
Sequential steps should start with decomposing the system into bounded contexts, then gradually migrate by routing reads first and writes later, with acceptance criteria and rollback triggers defined beforehand.
CDC paired with the transactional outbox pattern is the safest data synchronization method for long-term migrations, as dual-write methods risk inconsistency and silent failures.
Continuous monitoring of latency, error rates, and business metrics with predefined thresholds is essential for a safe cutover, and automating rollbacks ensures quick recovery if issues arise.
What Is the Strangler Pattern and When Should You Use It?
The strangler fig pattern gets its name from the actual tree: a vine that grows around a host trunk, gradually taking over its structural role until the original wood is no longer needed. In software terms, you place a façade in front of your legacy system that routes each incoming request to either the old system or a new service, capability by capability, until the legacy code has nothing left to do. This is the strangler fig pattern as defined by Microsoft’s Azure Architecture Center, and it’s the standard reference point for anyone planning this kind of migration.
Not every legacy replacement needs this much ceremony. A small internal tool with three users and a weekend of downtime tolerance can probably survive a rewrite. Reach for the strangler pattern architecture when several of these apply:
-
The system carries real uptime requirements, and a failed cutover would hurt revenue or trust.
-
You can identify distinct bounded contexts (billing, inventory, auth) rather than one tangled ball of logic.
-
You have enough access to the legacy codebase and its data layer to intercept and mirror traffic.
-
Business stakeholders would rather see incremental wins than wait a year for a single “big reveal” launch.
Martin Fowler, who popularized the strangler fig metaphor, frames modernization as discovery work. You rarely know every legacy quirk up front. You learn them by running the new service against real traffic and watching where it disagrees with the old one.
What Core Components Do You Need Before You Extract Anything?
Four pieces need to exist before you touch your first bounded context, and skipping any of them is how strangler migrations turn into permanent, half-finished messes.
-
The façade. This can be an API gateway, a reverse proxy like Nginx, or a purpose-built router. Routing decisions can happen by URL path, request header, user segment, or percentage-based canary split, and the choice of façade shapes everything downstream, including how granular your rollback can be.
-
The anti-corruption layer (ACL). This translates between the legacy system’s data model and your new service’s model, so legacy quirks don’t leak into clean new code. Contract tests against this layer catch breakage before production does.
-
Feature flags. Separate release toggles (turning a new code path on for real users) from ops toggles (adjusting behavior for load or config) and kill switches (an emergency full revert). Each flag needs a named owner and an expiration date, or it becomes permanent scaffolding nobody remembers approving.
-
Comparator and shadow traffic tooling. Send production traffic to both systems, compare outputs field by field, and only promote the new path once mismatches drop to an acceptable threshold you defined in advance, not one you improvise under pressure.
Pro Tip: Give every feature flag a calendar reminder for its own removal. A flag with no expiration date is a flag that outlives the engineer who wrote it.
How Do You Sequence a Strangler Pattern Migration Step by Step?
The order matters more than the tooling. Architects who skip steps here are the ones who end up with a distributed monolith instead of a modernized system.
-
Inventory and decompose by domain. Map your legacy system into bounded contexts before writing a single line of new code. This is where most migrations either get traction or stall in analysis.
-
Install the façade as a no-op seam. At this stage it should route everything to the legacy system unchanged, and it belongs in version control from day one.
-
Pick your first slice by value or low coupling. Favor a capability that matters to the business but doesn’t touch six other subsystems. A practical migration guide for architects recommends starting with vertical business slices, not horizontal technical layers like “all the database calls.”
-
Build the ACL and the new service, then run it in parallel with shadow traffic and a comparator watching for divergence.
-
Ramp reads first, writes second. Canary a small percentage of read traffic to the new path, hold, expand, and only then start migrating writes once reads have proven stable.
-
Define acceptance criteria and rollback triggers before you ramp, not after something breaks at 2 a.m.
-
Decommission formally. Remove the legacy code path, clean up the schema, and retire the façade routing rule for that capability on a scheduled date.
| Stage | Primary Risk If Skipped | Rollback Complexity |
|---|---|---|
| Façade install | No safe seam to route through later | Low, revert config |
| ACL + shadow traffic | Legacy data quirks corrupt new service | Medium |
| Read canary ramp | Silent output mismatches reach users | Medium |
| Write canary ramp | Data divergence between systems | High |
| Decommission | Façade debt lingers indefinitely | N/A, one way |
Which Data Strategy Should You Use: CDC, Outbox, or Dual-Write?
Data migration is where most strangler pattern architecture efforts actually fail, not on the routing logic. Two systems writing to two data stores creates a synchronization problem that never fully goes away until one store retires.
Dual-write, where your application writes to both the old and new database in the same request, looks simple on a whiteboard and breaks constantly in production. If the second write fails after the first succeeds, you now have silently inconsistent data with no built-in signal that anything went wrong.
Change data capture (CDC) paired with the transactional outbox pattern is the safer, industry-preferred route. The outbox pattern writes your business change and an event record in the same database transaction, then a separate relay process (something like Debezium tailing a database’s write-ahead log) publishes that event to a message bus asynchronously. Nothing gets lost, because the event and the business write either both commit or both roll back together.
Practitioner guidance is consistent on this trade-off: dual-write is fragile and transitional, while CDC plus outbox is the preferred zero-downtime approach for anything you plan to run for more than a few weeks.
For safety-critical domains like payments or permissions, even CDC and outbox aren’t enough on their own. Run shadow writes with exhaustive field-by-field comparison and demand a zero-mismatch acceptance window before you let the new system take write traffic for real. The stakes for getting a permissions check wrong are simply different from getting a product description wrong, and your migration plan should reflect that difference explicitly.
What Testing and Rollback Safeguards Do You Need in Production?
Shadow traffic comparators need defined acceptance thresholds before you ramp a single percent of real read traffic, not after. Decide in advance what “close enough” means for your comparator output, because “we’ll know it when we see it” is not a threshold.
Watch these signals continuously once you’re live on the new path:
-
Latency percentiles (p50, p95, p99), not just averages that hide tail failures.
-
Error rate on the new service compared against the legacy baseline for the same traffic slice.
-
Business-metric parity: order counts, revenue per hour, login success rate, whatever actually matters to the business.
-
Correlation IDs threaded through both systems so you can trace one request across the façade, both backends, and the comparator.
Set a canary schedule with real hold periods. Never ramp on a Friday afternoon.
Pro Tip: Automate your rollback to a known-good façade config stored in version control, and time it. If a rollback takes longer than five minutes to execute, it’s not a real safety net yet, it’s a hope.
What Should Be on Every Architect’s Strangler Migration Checklist?
Ampersand Labs has run legacy migrations for organizations with genuinely complicated legacy footprints, including managing hundreds of interconnected websites for a Swiss political party through a single system, and a few controls consistently separate migrations that finish from ones that stall for years:
-
Assign one named owner and a service level objective to the façade itself. It is production infrastructure, not a temporary bridge.
-
Set a decommission date for every extracted capability on the same day you start extracting it, not after it’s live.
-
Prefer vertical slices by bounded context over horizontal technical layers, since horizontal slicing is how distributed monoliths get built by accident.
-
Keep senior engineers involved from planning through extraction through handover, since context lost mid-project is exactly how “temporary” façade debt becomes permanent.
-
Require three deliverables per extraction: a comparator report, a written rollback runbook, and the decommission pull request that removes the legacy path.
Without a firm retirement target, legacy code just lingers, and the cost savings you promised the business never actually show up on anyone’s ledger.
Get Senior-Led Help Running Your Strangler Migration
Strangler pattern migrations should be run as described in this guide: façade first, one bounded context at a time, comparator data before any cutover. The benefit of this approach is leadership continuity, with senior engineers involved from the first architecture conversation through the final decommission pull request, ensuring the extraction plan stays consistent.
That continuity matters most on the exact work this article covers: legacy system migration and replatforming engagements where losing institutional knowledge mid-project is what turns a six-month plan into an eighteen-month scramble. Ampersand also handles the system integration and API work that CDC and outbox pipelines depend on, plus ongoing support once your façade is live in production.
If you’re scoping a migration and want a senior engineer’s read on your architecture before you commit, check current pricing and engagement options or look at recent Swiss software projects to see how the approach plays out in practice.
Sources
For deeper technical grounding beyond this guide, start with the canonical sources: Microsoft’s Azure Architecture Center entry on the strangler fig pattern, Martin Fowler’s original bliki post, and the Wikipedia summary for a quick encyclopedic overview. For CDC and outbox implementation details, the HLD Handbook’s practitioner writeup covers tooling trade-offs in depth. If your migration touches public-facing URLs, this migration SEO checklist is worth a read before you finalize your façade’s routing rules.
-
Strangler Fig: Incremental Migration Without a Big Bang - The HLD Handbook
-
Strangler Pattern Migration: A Practical Guide for Architects - Golden Path Digital
FAQ
What Is the Strangler Pattern in Software Architecture?
It’s a migration technique where a routing façade sits in front of a legacy system, sending each request to either the old code or a new replacement service. Over time, more traffic shifts to the new services until the legacy system can be retired entirely.
How Long Does a Strangler Pattern Migration Take?
It varies by system size and complexity, but industry case series consistently show strangler migrations run longer than big-bang rewrites while carrying lower deployment risk. Expect a timeline measured in months for a single bounded context, and potentially years for a full legacy estate.
Is Dual-Write Ever Acceptable During Migration?
Dual-write can work as a short-term bridge for low-stakes data, but it’s fragile because a partial failure leaves your two systems silently inconsistent. For anything running more than a few weeks, CDC combined with the transactional outbox pattern is the safer standard.
What’s the Biggest Mistake Teams Make With the Strangler Pattern?
Treating the façade as temporary. Without an assigned owner, an SLO, and a decommission date set on day one, the façade and its old code paths tend to linger indefinitely instead of getting retired.
Can Ampersand Labs Help Run a Strangler Migration End to End?
Yes. Ampersand Labs offers legacy system migration and replatforming led by senior engineers from planning through decommission, along with the system integration work that CDC and outbox pipelines require. Current pricing details are listed on the Ampersand Labs pricing page.
Recommended
Talk to us
Have a project this touches on?
A free 10-minute call is the fastest way to find out whether we are the right studio for it.
Book a free 10-min callKeep reading
More articles.
Avoid 74% Rollbacks: AI in Customer Support Built for Enterprise Ops
Run an operational-first AI pilot for enterprise customer support: shadow one workflow, stage authorizations, enforce governance, and integrate APIs to...
Read article3 Month POC for CRM ERP Integration: Senior Led Swiss Rollout
Prove CRM and ERP sync with a three month proof of concept led by senior engineers. Practical checklist, architecture options, and Swiss compliance notes.
Read article4 Questions and Governance to Choose Fixed Price or Time and Materials
Four questions plus governance controls to decide fixed price or time and materials. Includes when to run a short discovery sprint before you price the work.
Read article