Strangler Fig Pattern in System Design
Replace a legacy system in useful, controlled slices
One entrance, gradually changing ownership
An old application still serves customers, but one part needs a new implementation. Replacing everything at once can make it difficult to compare behaviour, recover from mistakes and keep the service running.
The strangler fig pattern gradually routes selected responsibilities to a replacement while the legacy system continues serving the rest. A facade or router can control that boundary. It is a migration strategy, not a promise that every old application can be split easily.
What you’ll learn
- Choose a bounded capability to migrate first.
- Plan routing, authoritative writes and rollback together.
- Define evidence for removing the old implementation safely.
Pick a slice with clear boundaries
Start from a capability and its dependencies. A public catalogue read may be easier to isolate than a payment operation touching several shared tables. Identify callers, data writes, scheduled jobs and external effects before moving traffic.
The new implementation needs an agreed contract. Preserve important request and response behaviour, permissions and error semantics, or deliberately version the interface for callers.
Small increments make observation and recovery easier, but an increment must still be coherent. Moving an endpoint without its data rules can leave two implementations disagreeing about ownership.
Choose cutover and rollback rules
Explore the design choices
Compare the visible consequences. With JavaScript enabled, choose an option in each scenario to assemble your decision record.
This is an exploratory design exercise. It does not run infrastructure, measure capacity or replace the lesson’s quiz.
A new catalogue service is ready for limited read traffic. Later, the team wants to move stock updates. Select a plan for each transition.
The exercise records a proposed decision. Real migration requires representative tests, data checks and a concrete rollback procedure.
The data transition is part of the migration
Moving reads and moving writes have different risks. A read copy needs a freshness and validation rule. A new authoritative writer needs a plan for old callers, background jobs and recovery.
Dual writes can fail between destinations. Change-data capture, an outbox, or a product-supported migration mechanism may help particular flows, but each needs ordering, duplicates and reconciliation rules.
Compatibility can require additive schema changes and a staged rollout. If the replacement writes data the legacy code cannot understand, flipping traffic back is not a complete rollback.
Compare behaviour before removing the old path
Define cutover checks: representative successful responses, authorization, failure outcomes, latency, data agreement and external effects. A shadow read can compare responses, but do not blindly shadow writes that charge, email or create duplicate actions.
Monitor route ownership and remaining legacy callers. Remove old code only after dependencies and background work are accounted for. The migration facade itself needs capacity, availability and understandable configuration.
AWS strangler fig guidance describes gradual replacement through a routing boundary. Source checked 6 October 2026. The pattern adds a transition period where both implementations must be operated.
Check your design decision
Check your design decision
Use translation and compatibility during migration
Compare the Anti-Corruption Layer for business-model translation and Adapter for a narrower interface mismatch. Facade can give callers a stable subsystem operation while responsibilities move.
Move responsibility with its data and recovery rules
Gradual replacement can reduce cutover risk when slices have clear contracts. Track ownership, dependencies and evidence for each step.
Plan data migration and rollback alongside routing. Finish by verifying remaining callers and retiring the old path deliberately.
Reaching the recap and completing the quizzes are separate milestones.