How should you apply the pattern to ensure smooth migration?
hard📝 Trade-off Q15 of 15
Microservices - Migration from Monolith
You are designing a migration plan using the Strangler fig pattern for a large monolithic app with features X, Y, and Z. Feature X is critical and must have zero downtime. How should you apply the pattern to ensure smooth migration?
AReplace feature X first with a new microservice and route only X requests there, keep Y and Z on legacy
BReplace all features at once to avoid partial routing complexity
CStop the legacy app and start new microservices for all features simultaneously
DKeep all features on legacy until new system is fully ready, then switch all at once
Step-by-Step Solution
Solution:
Step 1: Prioritize critical feature migration
Feature X requires zero downtime, so migrate it first carefully.
Step 2: Apply gradual routing for feature X only
Route requests for X to new microservice while Y and Z remain on legacy to reduce risk.
Step 3: Avoid full switch or stopping legacy abruptly
The other options risk downtime or complexity by switching all features at once.
Final Answer:
Replace feature X first with a new microservice and route only X requests there, keep Y and Z on legacy -> Option A
Quick Check:
Gradual critical feature migration = D [OK]
Quick Trick:Migrate critical features first, route requests gradually [OK]
Common Mistakes:
Trying to replace all features at once
Stopping legacy before new system ready
Delaying critical feature migration
Master "Migration from Monolith" in Microservices
9 interactive learning modes - each teaches the same concept differently