Architecture migration
On this page 9 topics
Overview
Topics
- Strangler fig
- branch by abstraction
- dual-write risks
Learn first
4.5 h of practice (estimate)
Learning outcomes
- Apply the strangler fig pattern with routing at the edge and incremental capability extraction.
- Use branch by abstraction inside the legacy codebase.
- Explain dual-write risks and replace them with CDC, outbox, or a single writer.
- Plan data migration for an extracted service, including the cut-over of ownership.
- Define per-step rollback and measurable exit criteria.
Lessons
Lab and exercises
Lab
SRB-008-LAB1 · Migration plan
Outcomes: 1, 2, 3, 4, 5 · Time: ~4.5 h
- Map the monolith's shipment tracking and carrier integration.
- Plan phases with routing, branch by abstraction, and data migration.
- Define rollback and measurable exit criteria per phase.
- Defend the plan to role-played FulfillCo teams.
Acceptance: no phase requires both systems to write the same data; rollback and metrics for every phase.
Exercises
| ID | Outcome | Task |
|---|---|---|
| SRB-008-EX01 | 1 | Argue against a proposed two-year rewrite of FulfillCo in five lines. |
| SRB-008-EX02 | 1 | Choose the first extraction candidate among shipment tracking, stock, and billing and justify. |
| SRB-008-EX03 | 2 | Sketch the interface and flag for branch by abstraction of carrier calls. |
| SRB-008-EX04 | 3 | A teammate proposes a temporary dual write. Write the objections and the alternative. |
| SRB-008-EX05 | 4 | Plan the data ownership cut-over for tracking history. |
| SRB-008-EX06 | 5 | Write exit criteria for the 50% traffic step. |
Show solutions
- EX01 Moving target, hidden behavior, no early value, hard to stop; propose strangler steps.
- EX02 Shipment tracking: bounded, high value to Shop, lower risk than stock or billing.
- EX03 CarrierGateway interface with legacy and remote implementations; flag per carrier.
- EX04 Non-atomic, drift risk; use CDC or outbox with a single writer.
- EX05 Backfill, one-way CDC sync, verify, switch writer behind a gate, reverse window, retire.
- EX06 Error rate within 0.1% of legacy, zero unreconciled records for 7 days, rollback tested.
Workplace evidence: a strangler or extraction step you led into production.
Quiz
Outcomes: O1 strangler · O2 branch by abstraction · O3 dual writes · O4 data migration · O5 rollback and exit.
A self-check for you: nothing is graded, saved or sent anywhere. Choose an answer, then check it. You can try again as often as you like.
Practical part
Migration plan defense: present the lab plan and answer challenges. Pass: 70% on the quiz and a plan with no shared-writer phase.
Common mistakes
Extracting the hardest piece first; no plan for retiring legacy code paths; dual writes "just for a while".
Assessment
Migration plan defense.
Workplace evidence
A strangler or extraction step you led into production.
Career relevance
Legacy modernization (ARC-010) and migration strategy (ARC-037).