CURRICULUM PREVIEWRevision 1 · Open for reviewReview the full course
CONNECTING THE PIECES10 min read

Strangler Fig migration

Replace a legacy capability in reversible slices.

Before you begincircuit-breaker

The problem and the pattern

Place routing in front of the old system and direct a bounded booking capability to the new implementation. Compare behavior and migrate data ownership deliberately. Keep routing reversible until the new path is proven, then retire the replaced legacy slice.

Follow the flow

Make it concrete

This excerpt isolates the concept. Connect it to the booking API as you work through the exercise.

Focused example
text
Route by capability
Legacy: existing booking reads
New: reservation creation for a selected tenant cohort
Observe → reconcile → expand → retire old path

Trade-offs

  • Incremental replacement reduces all-or-nothing release risk.
  • Temporary integration and dual-running costs are real.
  • Define cutover and retirement criteria before adding the new slice.

When to avoid it

Avoid a strangler migration without a usable routing seam or an agreed data-ownership transition.

Your turn

Why can independent writes to old and new databases create a migration trap?

Reveal a worked answer

Either write can fail, producing divergent state with no authoritative owner. Choose one write owner, use a reliable replication or outbox path if necessary, and verify reconciliation before shifting readers.

Keep exploring

One more piece connected.

Mark this lesson complete when you can explain the idea.