Stackbook Logo
economics-evolutionestablished · high operational burden

Strangler Migration Planning

Also known as: strangler-fig-planning, incremental-migration-roadmap

Intent

Plan the replacement of a legacy system slice by slice, with measurable progress and a retirement date.

Problem

Big-bang rewrites take years, freeze features, and often fail. Starting a strangler migration without a plan leaves two systems running indefinitely with no end in sight.

Forces

  • •Business must keep shipping during migration
  • •Legacy and new systems must interoperate
  • •Data ownership is hard to split
  • •Migration fatigue erodes momentum

Solution

Overview

Named by Martin Fowler after strangler figs that grow around a host tree, this approach grows the new system around the old one until the old can be removed. Planning matters as much as the technique: sequence, ownership of data, and an end date.

Good slices are vertical and bounded: a capability with a clear interface, limited shared data, and measurable behavior. Avoid slicing by technical layer, since that leaves both systems involved in every request and multiplies coordination.

How it works

A facade routes each capability to old or new implementations.

client -> routing facade
   /orders/*   -> NEW service   (100%)
   /invoices/* -> split 20% NEW / 80% LEGACY (shadow compare)
   /reports/*  -> LEGACY
Burn-down: 12 routes remain; legacy decommission target: 2027-03-31

Validate behavior before cutting over. Shadow traffic sends copies of requests to the new service and compares responses without affecting users. Then shift a small percentage, watch error rates and latency, and increase. Keep rollback to the legacy route available until the slice has run cleanly for an agreed period.

Pitfalls

  • No decommission date or owner, so the legacy never dies
  • Migrating code but leaving data in the old database, creating hidden coupling
  • Starting with the hardest slice instead of a small, valuable first win
  • Allowing new features in legacy, which grows the target

Key takeaways

  • Sequence slices by value, risk, and coupling
  • Route through a facade and shift traffic gradually
  • Move data ownership explicitly
  • Track burn-down and set a retirement date

✓ When to Use

  • •Legacy system too large to rewrite at once
  • •Business cannot tolerate long feature freeze
  • •Interfaces to the legacy system can be intercepted

✗ When Not to Use

  • •System is small enough to replace quickly
  • •No seam for a routing facade exists
  • •No commitment to decommission the legacy

Pros

  • +Continuous delivery of value and early feedback
  • +Low-risk rollback per slice
  • +Visible progress through burn-down

Cons

  • −Prolonged period of dual maintenance
  • −Facade and data sync add temporary complexity
  • −Requires discipline to finish

Cost Profile

Infrastructure

Medium - both systems run in parallel

Operational

High during migration

Cognitive

Medium

Failure Modes

  • Migration stalls at 80 percent and both systems live forever

  • Data diverges between old and new owners

  • New features keep landing in the legacy system

Real-World Examples

Alternatives

    Related Patterns

    • database-migration
    • canary-deployment

    Competency Domains

    economics evolutionreliability ops