Services
Digital Platform ModernizationSoon
Intelligent Automation & AISoon
Decentralized & Trust SystemsSoon
Dedicated Technology TeamsSoon
Capabilities
Enterprise Platform EngineeringStrangler-Fig MigrationMulti-Tenant SaaS TopologyEvent-Driven ArchitectureZero-Trust Infrastructure & Cloud IAMFederated API GatewaysE-commerce & Marketplace
Cloud DevOps & ScalabilitySoon
Intelligent Automation & AISoon
Blockchain & Trust SystemsSoon
Dedicated Engineering TeamsSoon
Industries
Healthcare & Life Sciences
Financial Services & FinTech
Supply Chain & Logistics
Education & eLearning
Retail & eCommerce
Oil & Gas
Case StudiesOur ThinkingAboutContactStart a POC
Architecture pattern · Legacy modernization

Strangler fig pattern for legacy modernization, without the big-bang risk.

Retire a legacy monolith step by step: route traffic through a facade, move features to decoupled Go and Python microservices, and delete legacy code only when it is safe.

Design targets · not measured results from past client work

Target · Planned Downtime0 hrs

Designed so traffic moves by routing changes, not maintenance windows.

Target · Parity Verification100%

Shadow traffic mirrors live requests so behavior can be compared before users are affected.

Target · Cloud Licensing Reduction60%

Legacy infrastructure overhead falls as microservices progressively take over load.

Target · Added Routing LatencySub-50ms

Edge routing gateways proxy traffic at the perimeter with minimal overhead.

The short answer

What is the strangler fig pattern?

The strangler fig pattern is a way to modernize a legacy system gradually instead of rewriting it all at once. A routing layer, usually called a facade or proxy, sits in front of the old system. New services are built behind it, requests are moved to them one feature at a time, and the old code is retired once nothing depends on it. The name comes from strangler figs, which grow around a host tree and eventually replace it. Martin Fowler popularised the pattern for software.

Introduce the facade

Put a proxy in front of the legacy system. At first it sends every request to the old code, so nothing changes for users.

Shift incrementally

Build one slice of functionality as a new service, test it against live traffic, then move traffic to it in steps while the legacy path stays available.

Retire and clean up

When a slice has no traffic and no dependants, remove its legacy code. When everything is moved, decommission the legacy system and decide whether to keep or remove the facade.

Robral plans and runs strangler fig migrations for enterprise monoliths: the routing facade, parity testing, data synchronization, canary cutover and the exit criteria for each slice, delivered first as a 14-day proof of concept.
Migration methodology

Three phases. Gated at every step. Reversible by design.

Each phase is gated by success criteria before the next one starts, with rollback triggers armed throughout.

01
Phase One

Interception & Perimeter Routing

Deploy an edge gateway layer in front of the existing monolith. Dynamic proxy rules allow selective traffic interception without changing legacy application code. All requests keep reaching the monolith while the new routing layer is validated in parallel.

  • Edge gateway deployment (Envoy / Kong / Nginx)
  • Dynamic proxy rule configuration
  • No changes to legacy application code
  • Request fingerprinting & logging
02
Phase Two

Shadow Traffic & Behavioral Parity

Mirror live production requests to the new microservice layer. Automated parity harnesses compare response payloads, status codes, latency distributions and side-effect patterns between legacy and new systems. Users see no change at this stage.

  • Shadow request mirroring with side effects stubbed
  • Automated response payload diffing
  • Latency distribution comparison
  • Side-effect parity validation
03
Phase Three

Incremental Cutover & Traffic Strangling

Begin canary shifting real user traffic to validated microservices: for example 1% to 5% to 10% to 50% to 100%. Each increment is gated by automated rollback triggers. If error rates or latency breach thresholds set in advance, traffic reverts to the legacy path.

  • Canary traffic percentage controls
  • SLO-gated automated rollback
  • Feature-flag per-endpoint cutover
  • Real-time error rate monitoring
Choosing an approach

Strangler fig, big-bang rewrite or rehost: which fits?

The strangler fig pattern suits large systems that must keep running during the change. It is not the right answer for every system.

ApproachDelivery riskFirst valueRollbackBest forMain risk
Strangler figSpread across many small steps, each with a rollback route.Early. The first migrated slice can go live in production.Simple while the legacy path still exists. Costly once legacy data and objects are removed.Large or critical systems that must keep running; teams that can intercept traffic and modify the legacy system.A long migration, a facade that becomes a bottleneck, or slices that stay tightly coupled.
Big-bang rewriteConcentrated in one cutover date.Late. Nothing is live until the rewrite is complete.Hard. The old system may be unmaintained by the time problems appear.Small, well-understood systems that are simple to replace.Scope growth, lost behavior nobody documented, and a single high-stakes cutover.
Rehost (lift and shift)Low. Code and architecture stay the same.Quick infrastructure change, but no architecture change.Simple. Move back to the old hosting.Exiting a data centre or contract quickly.The monolith remains, so the original delivery and scaling problems remain too.

Microsoft lists cases where the pattern does not fit: requests that cannot be intercepted, a legacy system that cannot be modified, a small system that is simple to replace, and a need to decommission quickly. See the references below.

Key engineering capabilities

Every migration primitive, engineered for production.

Core engineering building blocks included in every strangler fig engagement.

Dynamic Traffic Interception & Proxying

Edge gateway configuration intercepting API calls at the network perimeter. Rules are hot-reloaded without service restarts, enabling safe routing experiments.

Envoy ProxyKong GatewayTraffic MirroringHot Reload

Data Sync via Change Data Capture

During overlap, data moves between legacy and new stores through change data capture and an event stream, with one system of record per data set at any time, instead of ad-hoc dual writes that can drift apart.

Change Data CaptureKafkaEvent StreamingReconciliation

Automated Parity Testing Harnesses

Custom test harnesses continuously compare response payloads, latency and side effects between legacy and new services. Differences surface in real-time dashboards.

Response DiffingLatency ProfilingAutomated AssertionsOpenTelemetry

Fallback & Automated Rollback Triggers

SLO-gated circuit breakers monitor error rates and p99 latency per endpoint. A breach of thresholds agreed before cutover sends traffic back to the legacy path without waiting for a person.

Circuit BreakersSLO MonitoringAuto-RollbackCanary Analysis
Engineering notes

What a safe cutover looks like.

Routing is the easy part. The discipline is in rollback thresholds, data ownership and exit criteria.

Weighted routing at the facade (illustrative, Nginx)
upstream legacy_monolith { server legacy.internal:8080; }
upstream orders_service  { server orders.internal:8080; }

# Same account always lands on the same side
split_clients "${http_x_account_id}" $orders_backend {
    5%  orders_service;   # canary step, raised as gates pass
    *   legacy_monolith;
}

server {
  location /orders/ { proxy_pass http://$orders_backend; }
  location /        { proxy_pass http://legacy_monolith; }
}

Raise the percentage only while error rate and p99 latency stay inside the thresholds you set before the first canary. Hashing on a stable key keeps each customer on one path. Rollback is a one-line change while the legacy path and its data are intact.

Cutover and exit checklist
  • All traffic for the slice goes through the facade; no client bypasses it.
  • Rollback thresholds (error rate, p99 latency, parity differences) are agreed before the first canary.
  • Each data set has one system of record at any time. Sync uses change data capture, not uncontrolled dual writes.
  • Shadow traffic runs with side effects stubbed, so mirrored writes cannot charge, email or ship twice.
  • Handlers are idempotent, so retries and replays do not duplicate effects.
  • Rollback is rehearsed. Rolling back a slice that writes data needs reverse synchronization, so it is not a simple switch.
  • Exit criteria to retire a slice: zero legacy traffic for an agreed period, no dependent consumers (batch jobs, reports, integrations), data validated, and the rollback window closed.
  • Legacy code, data and infrastructure for the slice are deleted after exit, not left behind.
Common mistakes

Where strangler fig migrations go wrong.

Six failure patterns we design against from the first week.

The distributed monolith

New services that share the legacy database or call each other in long synchronous chains carry the old coupling into a more complex system. Give each service ownership of its data and keep boundaries clear.

Shared databaseChatty callsService boundaries

Ad-hoc dual writes

Writing to two stores from application code can leave them out of step when one write fails. Pick one system of record, sync with change data capture, and reconcile on a schedule.

Dual writeReconciliationCDC

Slices that are too big

A slice that takes months to ship brings back big-bang risk. Choose slices that can go live, be measured and be rolled back in weeks.

Small slicesVertical slicesEarly value

The facade as bottleneck

The routing layer sees every request, so it needs redundancy, monitoring and capacity. Microsoft warns it can become a single point of failure or a performance bottleneck.

High availabilityCapacityObservability

Rollback that was never rehearsed

Rolling back is simple for read-only features. Once a slice writes data, it needs reverse synchronization and a tested plan. Rehearse it before the first real canary.

Rollback drillsReverse syncRunbooks

Never finishing

Without exit criteria, the legacy system lingers and costs double. Keep the facade only if you choose to, and delete legacy code when each slice exits.

Exit criteriaDecommissioningCost tracking
What you receive

A working proof of concept. In 14 days.

01

Live Traffic Routing Sandbox

Deployed edge gateway with real traffic interception wired to a shadow microservice running in isolation on AWS or GCP.

02

Parity Validation Report

Behavioral comparison report: response diffs, latency heatmaps and side-effect parity across shadow traffic.

03

Migration Roadmap & IaC Repo

Phase-by-phase migration blueprint with Terraform infrastructure, rollback runbooks and go/no-go criteria per phase.

Not slides. Not a proposal. A live migration sandbox with real traffic routing.
Choosing a partner

How to choose a legacy modernization partner.

Six questions to ask any firm, including us, before you commit.

01

Slicing strategy

Ask how they choose the first slice and the order after it. Look for reasoning based on business value, risk and coupling, with slices small enough to ship in weeks.

Red flag: "we will rewrite the core first"
02

Data ownership

Ask how data stays consistent while both systems run. Look for one system of record per data set, change data capture and reconciliation.

Red flag: "we write to both databases"
03

Rollback and gates

Ask what triggers a rollback and who decides. Look for thresholds agreed in advance, automated triggers and rehearsed runbooks, plus honesty about writes.

Red flag: no defined thresholds
04

Parity evidence

Ask how they prove the new service behaves like the old one. Look for shadow traffic, response diffing and side-effect checks with stubs.

Red flag: manual testing only
05

Exit criteria

Ask how you will know a slice is finished. Look for named criteria: zero legacy traffic, no dependants, validated data, closed rollback window.

Red flag: no decommissioning plan
06

Ownership and handover

Ask what you own at the end. Look for code, infrastructure as code, runbooks and training handed over, with acceptance criteria agreed up front.

Red flag: black-box delivery
Questions and answers

Strangler fig pattern: common questions.

What is the strangler fig pattern in software?

It is an incremental way to replace a legacy system. A facade or proxy sits in front of the old system and routes requests either to it or to new services. Functionality is moved one piece at a time, and the legacy system is decommissioned once nothing depends on it. The name comes from strangler figs, plants that grow around a tree and eventually replace it.

How do you migrate a monolith to microservices with the strangler fig pattern?

Place a proxy in front of the monolith, then build new functionality as services behind it. Shadow traffic against the new service to compare behavior, then move real traffic in canary steps with rollback thresholds set in advance. Keep data consistent with change data capture, and remove each legacy slice only after its exit criteria are met.

Can you roll back a strangler fig migration?

Yes, but how easy it is depends on the slice. Rollback is simple while the legacy path and its data still exist, and especially simple for read-only features. Once a slice writes data to the new store, you need reverse synchronization and a rehearsed plan. Microsoft notes that rollback becomes costly after legacy objects are removed, so treat removal as a deliberate final step.

How do you keep data consistent during a strangler fig migration?

Give each data set one system of record at any time. Use change data capture and an event stream to replicate changes, validate consistency before cutover, then switch ownership. Avoid ad-hoc dual writes from application code, because a failed second write leaves the two stores out of step. AWS describes synchronization between old and new stores as a tactical solution, to be replaced by a longer-term data design.

When should you not use the strangler fig pattern?

Microsoft lists four cases: when requests to the back end cannot be intercepted, when the legacy system cannot be modified, when the system is small enough to replace outright, and when the original solution must be decommissioned quickly. In those cases a rewrite, rehost or another approach may fit better.

What happens to the facade when the migration ends?

You choose. Often the facade is removed and clients call the new system directly. Alternatively it stays as an adapter for legacy clients while the core moves on. The risk is keeping it by accident, so decide explicitly and make sure it never becomes a single point of failure.

How long does a strangler fig migration take?

It depends on the size of the system, how tightly it is coupled and how many slices you choose. The pattern is designed to deliver value early: the first slice can reach production while the rest of the migration continues. A proof of concept on one slice is the quickest way to get a realistic estimate.

Retire your monolith

Ready to retire your legacy monolith?

Book a technical audit with our principal architects to blueprint your incremental migration roadmap.