tadata
Back to home

Migration Strategies: Moving Away from Legacy Without Burning Down the House

#architecture#migration#legacy#modernization

Every mature organization has legacy systems. The question is never whether to modernize but how to do it without halting business value delivery. The graveyard of failed "big bang" rewrites is large. Incremental strategies win.

Migration Pattern Comparison

PatternApproachRiskDurationTeam SizeRollback
Strangler FigReplace piece by piece behind a facadeLowLong (months-years)Small-MediumPer component
Branch by AbstractionAbstract interfaces, swap implementationsLow-MediumMediumMediumPer abstraction
Parallel RunRun old and new simultaneously, compareMediumMediumLargeInstant (keep old)
Big Bang RewriteReplace everything at onceVery HighLongLargeAll or nothing
Lift and ShiftMove as-is to new infraLowShortSmallEasy
Feature Parity + CutoverBuild new until feature parity, then switchHighVery LongLargeComplex

Strangler Fig Pattern

Phase 1: Facade                  Phase 2: Migrate                Phase 3: Complete
┌──────────────┐                 ┌──────────────┐                ┌──────────────┐
│   Facade /   │                 │   Facade /   │                │   Facade /   │
│   API GW     │                 │   API GW     │                │   API GW     │
└──┬────────┬──┘                 └──┬────────┬──┘                └──────┬───────┘
   │        │                       │        │                          │
   │ 100%   │ 0%                    │ 40%    │ 60%                     │ 100%
   │        │                       │        │                          │
┌──▼──┐  ┌──▼──┐                 ┌──▼──┐  ┌──▼──┐                   ┌──▼──┐
│OLD  │  │NEW  │                 │OLD  │  │NEW  │                   │NEW  │
│     │  │     │                 │     │  │     │                   │     │
└─────┘  └─────┘                 └─────┘  └─────┘                   └─────┘

Risk Assessment Matrix

Risk FactorLow (1)Medium (2)High (3)
Data complexitySimple schemas, few relationsModerate schemas, some couplingComplex schemas, heavy cross-refs
Integration count0-3 downstream systems4-10 downstream systems10+ downstream systems
Domain knowledgeWell-documented, team knows itPartial docs, some tribal knowledgeNo docs, original team gone
Business criticalityInternal toolRevenue-supportingRevenue-critical, SLA-bound
Test coverage> 70%30-70%< 30% or unknown
Data volume< 10GB10GB-1TB> 1TB
Regulatory constraintsNoneAudit trail neededCompliance certification required

Scoring: 7-10 = Strangler Fig or Lift-and-Shift, 11-16 = Branch by Abstraction or Parallel Run, 17-21 = start with assessment phase, consider external help.

Timeline Planning Framework

PhaseDurationActivitiesGate Criteria
Discovery2-4 weeksMap dependencies, identify seams, assess riskRisk matrix completed
Foundation2-6 weeksBuild facade/proxy, set up dual-write, CI/CDRouting works, zero traffic to new system
Migration Wave 14-8 weeksMigrate lowest-risk componentProduction traffic on new component
Migration Wave N4-8 weeks eachMigrate next component by priorityEach wave validated in production
Decommission2-4 weeksRemove legacy code, clean up dataOld system fully offline
Stabilization2-4 weeksMonitor, fix edge cases, update docsSLOs met for 2 consecutive weeks

The Feature Parity Trap

Effort ▲
       │                          ╱ "Just one more feature"
       │                        ╱   before we can switch
       │                      ╱
       │                    ╱        ← Trap zone: legacy keeps
       │                  ╱            evolving, target moves
       │                ╱
       │         ●────╱── Planned cutover (missed)
       │       ╱
       │     ╱
       │   ╱
       │ ╱
       └──────────────────────────────────────────► Time
         Start    6mo      12mo     18mo     24mo

  Solution: Define a FROZEN feature set. New features go
  to the new system only. Accept temporary gaps.

Key Principles

Migrate data last. Move routing and compute first. Data migration is the riskiest and most irreversible step. Delay it until everything else is proven.

Measure parity, do not feel it. Define quantitative criteria for when a component is ready: latency P99, error rate, throughput. "It seems to work" is not a migration gate.

Budget for the long tail. The last 10% of migration takes 50% of the effort. Plan for it. Edge cases, data inconsistencies, and undocumented behaviors live in that tail.

Resources