BLUEPRINT · The Solution Architect's Codex
Ch 16 · Migration & Modernization
Chapter 16 · From legacy to landing zone, one wave at a time

Migration & Modernization — moving the running car

Greenfield is the architect's holiday; brownfield is the job. Most of the systems you will ever touch already exist, already serve customers, already run on something you didn't choose. Modernisation is the disciplined practice of changing them without breaking them: scoring portfolios, picking the right "R", strangling the old behind a facade, double-running until proof, and cutting over with a tested rollback. This chapter assembles the decision frameworks, the patterns, the tools, and the risk register.

16.1 · The modernisation decision matrix

Before choosing a migration verb, score the application. Gartner's TIME model (Tolerate, Invest, Migrate, Eliminate) plots each app on Business Value × Technical Fit and assigns one of four dispositions; it has been the dominant Application Portfolio Management (APM) framing since 2010. Variants: Gartner PACE Layered (Systems of Record / Differentiation / Innovation) and the McKinsey/Forrester rationalisation grids.

QuadrantBusiness valueTechnical fitAction
TolerateLowHighKeep as-is; minimal investment
InvestHighHighStrategic — modernise, extend
MigrateHighLowRe-platform, refactor, or replace
EliminateLowLowRetire — confirm no live consumers
Architect's framing
Score every app on a 1–5 scale across both axes. Anything below 2 on both is a Retire candidate; document the consumers before pulling the plug.

16.2 · Gartner's 7 Rs of cloud migration

Originally Gartner's 5 Rs (2010), expanded by AWS to 6 (2016), then to 7 (2021). Each application picks one disposition; large estates split across all seven.

RMeaningExample
RetireSwitch off — no replacementReporting tool nobody uses
Retain (revisit later)Stay on-prem for now (compliance, dependency)Air-gapped HSM appliance
Rehost (lift-and-shift)Move VMs unchanged to IaaSVMware VM → AWS EC2 via MGN
RelocateMove at hypervisor level (no OS change)VMware Cloud on AWS / Azure VMware Solution
Replatform (lift-and-reshape)Small changes to use managed servicesSelf-managed Postgres → RDS / Cloud SQL
RepurchaseReplace with SaaSOn-prem CRM → Salesforce / Dynamics 365
Refactor / Re-architectRewrite to cloud-nativeMonolith → microservices on EKS + DynamoDB

Cost and risk increase left-to-right; long-term TCO and agility improve in the same direction. Most estates land 40 % Rehost, 25 % Replatform, 15 % Repurchase, 10 % Refactor, 10 % Retire/Retain — though numbers swing wildly with industry and regulation.

16.3 · The strangler fig pattern

Coined by Martin Fowler in 2004, named after the strangler fig vine that wraps a host tree and replaces it. The new system grows around the legacy, intercepting more of its surface area each release, until the legacy can be removed. The pattern requires a facade (proxy, gateway, or library shim) routing each request to either old or new.

Strangler fig steps

Legacy monolith Facade / proxy router · canary New svc A New svc B Clients unchanged
  1. Insert a facade in front of the legacy with no behaviour change.
  2. Identify a seam (a bounded slice — see Ch 07 DDD).
  3. Build the new implementation behind the facade.
  4. Route a small % of traffic; verify parity.
  5. Increase percentage; keep legacy warm for rollback.
  6. Decommission the legacy slice when traffic is zero for an agreed cool-off.

16.4 · Branch by Abstraction

Coined by Paul Hammant (2007), popularised by Jez Humble. Used inside a codebase rather than between deployables. Introduce an abstraction over the part you want to change; route all callers through it; build the new implementation behind the abstraction; flip the flag; remove the old. Trunk-based development friendly, no long-lived feature branch.

16.5 · Parallel run / shadow run

Both old and new process the same input; results are compared but only one set is authoritative. Variants: shadow (new sees real traffic but never replies — Twitter's Diffy, GitHub's Scientist library, 2016) and dual-write parallel (both write; reconcile). Use to gain statistical confidence before cut-over.

VariantAuthoritativeRisk profile
Shadow (read-only)OldLowest — new can be wrong silently
Parallel compute / compareOldOperational — must run both at scale
Dual-write (canary)SwitchingHard — two writers, reconciliation
Traffic-mirror cut-overNew (with rollback)Highest confidence, biggest investment

16.6 · Blue-green for data — large migrations

Stateful migrations need a recipe that keeps the writeable set consistent through cut-over:

1 · Backfill
bulk copy historical
→
2 · CDC
change-data-capture stream
→
3 · Dual-write
app writes both
→
4 · Validate
row counts, checksums
→
5 · Cut-over
flip reads then writes

Tools commonly used: AWS DMS Debezium Striim GoldenGate Qlik Replicate (Attunity) Azure Data Migration Service GCP Database Migration Service.

16.7 · Mainframe modernisation

Z/OS and AS/400 estates still run the world's payments, insurance, and reservations. Four broad paths:

PathDescriptionVendors / services
Re-host / emulateRecompile COBOL/CICS to run on x86 with emulationMicro Focus Enterprise Server, Heirloom Computing, LzLabs Software Defined Mainframe
Re-platform (managed)Cloud-managed runtime + toolingAWS Mainframe Modernization (2021), Azure Mainframe Migration / Astadia, Google Dual Run + G4 Cornerstone
Re-engineer / language migrationConvert COBOL → Java / C#; rewrite JCL → AirflowAWS Blu Age, TmaxSoft OpenFrame, Modern Systems, Asysco AMT
Replace with SaaS / packageBuy a vertical-industry platformGuidewire (insurance), Temenos / Mambu (banking), Sabre / Amadeus (travel)
Mainframe truth
The hardest part is not the COBOL — it's the 40 years of batch interdependencies, JCL chains, and undocumented business rules. Budget more for discovery than for code conversion.

16.8 · SaaS migration patterns

  • Multi-tenant onboarding — silo (one stack per tenant), pool (shared, partition-keyed), bridge (shared compute + dedicated DB). Pick per tenant tier (cross-reference Ch 09).
  • Data isolation — schema-per-tenant vs row-level security; encryption-key-per-tenant for regulated tiers.
  • Customisation — configuration over code; tenant feature flags; extension points (webhooks, scripting sandboxes).
  • Region migration — replicate to target region, dual-read, cut-over writes during low-traffic window, decommission source. Honour residency contracts and consent records throughout.
  • Plan migration — upgrades, downgrades, free→paid; preserve data, revoke entitlements atomically.

16.9 · Migration wave planning

  1. Discovery — agentless + agent-based inventory (servers, services, dependencies, traffic flows).
  2. Assessment — score each app (TIME quadrant + 7R disposition + business criticality + complexity).
  3. Wave grouping — group by dependency closure (move together what calls together), with business-priority weighting. A wave should be independent of later waves.
  4. Pilot wave — 1–3 non-critical apps to prove tooling, training, and run-book.
  5. Ramp — 3–6 apps per wave, fortnightly cadence; retrospective after each.
  6. Cut-over & hyper-care — defined window, dry-run, rollback rehearsal, 14-day elevated support.

16.10 · Tooling landscape

CategoryTools
Discovery & dependency mappingAWS Application Discovery Service, Azure Migrate Discovery, GCP StratoZone (acq. 2020), Device42, RISC Networks (Flexera), Cloudamize, vRealize / Aria
Block-level replication (rehost)AWS MGN (CloudEndure successor), Azure Migrate: Server Migration, GCP Migrate to Virtual Machines (Velostrata), Carbonite Migrate, Zerto
Container modernisationAWS App2Container, Azure Migrate App Containerization, kompose, Buildpacks (CNB)
Database migrationAWS DMS + Schema Conversion Tool, Azure DMS, GCP DMS, Striim, Qlik Replicate, Debezium, Ispirer
MainframeAWS Mainframe Modernization, Micro Focus, Heirloom, LzLabs, Astadia, TmaxSoft
FinOps / TCO during migrationCloudHealth (VMware), Flexera One, Apptio Cloudability, Vantage
Programme managementAWS Migration Hub, Azure Migrate hub, Cloamp, ServiceNow APM

16.11 · Data migration patterns

PatternWhen to useTrade-offs
ETL one-shotSmall dataset, planned downtime acceptableSimple; requires an outage window
Dual-write + backfillApp-controlled writes; small historyApplication change; reconciliation harness
CDC + cut-overLarge dataset, near-zero downtimeMost popular; complex tooling (DMS, Debezium)
Trickle migrationPer-tenant or per-region rolloutLong co-existence; double cost during transition
Offline appliance (Snowball / Data Box / Transfer Appliance)Petabyte-scale, limited bandwidthDays–weeks transit; encryption in-transit and at-rest

16.12 · Risk register for a migration

#RiskMitigation
1Undiscovered dependency (hidden batch, scheduled task)Network flow logs + agent-based discovery; 2-week observation window
2Performance regression after moveBaseline pre-migration; load test in target; latency budget (Ch 14)
3Data loss during cut-overCDC + dual-write + checksum validation; rehearsed rollback
4Licence non-portability (Oracle, SQL Server BYOL)Licence audit early; vendor sign-off for cloud use
5Compliance / data residency violationRegion/zone constraints in IaC; data classification mapped to allowed regions
6Skills gap on target platformPilot wave doubles as training; pair with vendor PS
7Cost blow-out (oversized instances, egress)Right-size at cut-over; FinOps gate (Ch 15); reserved/savings plans 60 days post-stable
8Vendor lock-in deepens during refactorHexagonal architecture (Ch 06); cloud-agnostic at interface
9Cut-over window overrunsDry runs; per-step time budget; automated rollback trigger
10Business stakeholder fatigueWave cadence with visible wins; comms plan; hyper-care SLAs

16.13 · Self-check

Q1 · A team wraps a legacy monolith with a routing facade, builds new services behind it, and shifts traffic over months. Which pattern is this?
Branch by Abstraction
Strangler Fig
Blue-green
Saga
Q2 · In Gartner's TIME model, an application with high business value but low technical fit is best classified as…
Tolerate
Eliminate
Migrate
Invest
Q3 · Which of the 7 Rs means "move VMs at hypervisor level without OS change," e.g. via VMware Cloud on AWS?
Rehost
Relocate
Replatform
Refactor
Q4 · The recommended near-zero-downtime data migration recipe combines…
A single overnight ETL dump
Backfill + CDC + dual-write + validation + cut-over
Dual-write only
Shipping a Snowball appliance