vishal patel
Applied in productionIntermediateUpdated 2026-09-23

Strangler Fig Migration

Replace a legacy system incrementally — route traffic slice by slice to the new system behind a facade until the old one can be switched off.

migrationlegacymodernisationrisk-reduction

The problem

"Big bang" rewrites fail. The old system keeps changing during the rewrite, the cutover weekend is terrifying, and value arrives only at the very end.

How it works

diagram
  1. Put a facade in front of the legacy system (API gateway, reverse proxy, CDN routing).
  2. Pick a thin vertical slice that's valuable and loosely coupled (e.g. one content type or one section of the site).
  3. Build it new, migrate its data, and route its traffic to the new system.
  4. Repeat until nothing routes to legacy, then decommission.

Making it safe

  • Keep data sync (one-way or two-way) during transition, or declare a single owner per slice.
  • Use feature flags or percentage routing for gradual rollout and instant rollback.
  • Shadow traffic or dual-run to compare outputs before switching.
  • Track a "legacy surface remaining" metric so the migration actually finishes.
Where I've used it

Enterprise CMS migrations are strangler-fig by nature. The hardest one I led (a US outdoor-retail brand) had content split across AEM and raw MySQL tables that had to land in one unified content model. The approach that de-risks this: agree the target content model first, automate extraction and transformation, validate counts and references, then cut over in slices. I later built an LLM-assisted tool that scrapes a legacy site, proposes the content model, and emits the import package, which made the "analyse legacy" step much faster.

Use it when
  • Legacy system is too big or risky to replace at once
  • Business can't freeze features during the migration
  • Traffic can be routed by URL, API path, tenant or feature
Avoid it when
  • The system is small enough to rewrite in weeks
  • Requests can't be intercepted or routed
  • Data is so entangled that slices can't be separated

Sources & further learning

Videos, courses, docs and books I recommend for this topic.

Related topics