Home/Labs/Strangler Fig Cutover
All 280 Labs
INTERACTIVE LAB🌱

Strangler Fig Migration Lab (Interactive)

Shift auth, orders, and billing routes from monolith to new services one percent at a time and roll back instantly. Route traffic percentages per endpoint through the anti-corruption facade, shadow-verify against the monolith, and watch divergence and risk respond to each cutover step.

Strangler Fig: Proxy Cutover Control Board

Fowler's pattern: shift each endpoint's traffic to the new service gradually, mirroring shadow reads and reconciling writes via CDC before committing.

/api/auth/*──►NEW SERVICE100% new / 0% legacy

✓ diff-reconciliation reports 100.00% data parity

/api/orders/*──►SPLIT ROUTING30% new / 70% legacy

✓ diff-reconciliation reports 100.00% data parity

/api/billing/*──►LEGACY MONOLITH0% new / 100% legacy

Not started: monolith owns all reads/writes.

Migration progress

Traffic on new architecture43%
Monolith still running57%

Current posture

Stage 2-3: Incremental strangle behind Envoy routing

Every migrated endpoint is mirroring reads and reconciling through the WAL/CDC pipeline, so each slider step is reversible in under a second at the proxy — no big-bang cutover day exists.

How It Works Under the Hood

The strangler fig replaces a monolith incrementally: a routing facade in front of legacy endpoints moves traffic to new services in small weighted slices while the monolith keeps absorbing the remainder. The safety mechanisms matter more than the routing: shadow traffic double-executes requests to compare outputs, Debezium CDC keeps dual-write databases synchronized, and one-click rollback restores 100% legacy routing the moment error budgets burn. Verification off plus traffic shifted means divergence accumulates silently — the classic way a migration dies is unreconciled data discovered months late.

Core Architectural Principles

  • Per-route traffic sliders (0-100%) move endpoints from monolith to the new service gradually.
  • Shadow verification compares legacy and new outputs; skipping it while routing traffic accumulates divergence.
  • The rollback control restores full monolith routing, and CDC keeps databases reconciled during coexistence.
Interview Round Script

When asked about legacy migration, name the pattern and its safety rails: routing facade, percentage cutovers, shadow double-execution with output comparison, CDC for data sync, and instant rollback. Emphasize big-bang rewrites fail, while strangler fig lets you abort any step, and call out the anti-corruption layer as the piece that keeps legacy semantics out of new services.

Key Trade-Offs

Zero-downtime incremental replacement versus running two systems, dual maintenance, and reconciliation cost during coexistence.

Related Curriculum Chapter

The Strangler Fig Pattern: Zero-Downtime Monolith Migration

Read Full Chapter Blueprint

Explore More Interactive Labs

View All 280 Labs