Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the Strangler fig pattern in system design?
It is a method to gradually replace or modernize a legacy system by building a new system around it and slowly redirecting parts of the old system's functionality to the new one until the old system is fully replaced.
Click to reveal answer
beginner
Why is the Strangler fig pattern named after a strangler fig tree?
Because just like the strangler fig tree grows around an old tree and eventually replaces it, this pattern grows a new system around the old one until the old system is no longer needed.
Click to reveal answer
intermediate
What is a key benefit of using the Strangler fig pattern?
It allows safe, incremental migration without stopping the entire system, reducing risk and downtime during modernization.
Click to reveal answer
intermediate
How does the Strangler fig pattern relate to microservices?
It helps break a monolithic legacy system into microservices step-by-step by redirecting specific features or modules to new microservices gradually.
Click to reveal answer
advanced
What is a common challenge when implementing the Strangler fig pattern?
Managing data consistency and integration between the old and new systems during the transition phase can be complex.
Click to reveal answer
What is the main goal of the Strangler fig pattern?
AMerge two unrelated systems
BBuild a new system from scratch without old system
CGradually replace a legacy system with a new system
DKeep the legacy system unchanged
✗ Incorrect
The Strangler fig pattern focuses on gradually replacing the legacy system by building a new system around it.
Which analogy best describes the Strangler fig pattern?
AA tree growing around and replacing another tree
BA river splitting into two streams
CA bridge connecting two islands
DA house being painted a new color
✗ Incorrect
The pattern is named after the strangler fig tree that grows around an old tree and eventually replaces it.
What is a key advantage of the Strangler fig pattern?
AAllows incremental migration with minimal downtime
BRequires complete system shutdown
CEliminates need for testing
DAvoids any changes to legacy code
✗ Incorrect
It enables gradual migration, reducing risk and downtime.
In microservices, how is the Strangler fig pattern typically used?
ABy ignoring the legacy system
BBy gradually redirecting features from monolith to microservices
CBy rewriting the entire monolith at once
DBy merging microservices into a monolith
✗ Incorrect
It helps break down a monolith by incrementally moving features to microservices.
What is a common challenge when applying the Strangler fig pattern?
ADesigning user interfaces
BFinding new developers
CChoosing a programming language
DManaging data consistency between old and new systems
✗ Incorrect
Data consistency and integration during transition is often complex.
Explain the Strangler fig pattern and how it helps in modernizing legacy systems.
Think about how a new system grows around an old one like a tree.
You got /4 concepts.
Describe how the Strangler fig pattern can be applied to break a monolithic system into microservices.
Focus on moving parts step-by-step rather than all at once.
You got /4 concepts.
Practice
(1/5)
1. What is the main goal of the Strangler fig pattern in microservices architecture?
easy
A. To build all new services from scratch before replacing the old system
B. To merge all services into a single monolithic application
C. To run the old and new systems completely separately without integration
D. To gradually replace parts of a legacy system with new services
Solution
Step 1: Understand the pattern's purpose
The Strangler fig pattern is designed to replace legacy systems gradually, not all at once.
Step 2: Compare options with the pattern goal
To gradually replace parts of a legacy system with new services matches the gradual replacement approach, while others describe different strategies.
Final Answer:
To gradually replace parts of a legacy system with new services -> Option D
Quick Check:
Gradual replacement = B [OK]
Hint: Strangler fig means gradual replacement, not all at once [OK]
Common Mistakes:
Thinking it replaces the whole system at once
Confusing it with parallel running without integration
Assuming it merges services into one
2. Which of the following is the correct way to route requests in the Strangler fig pattern?
easy
A. Send requests randomly to either legacy or new system without control
B. Direct all requests to the legacy system until the new system is fully ready
C. Route requests step-by-step from the legacy system to new microservices
D. Stop the legacy system completely before routing any requests
Solution
Step 1: Identify routing strategy in Strangler fig
The pattern routes requests gradually from old to new components, not all at once or randomly.
Step 2: Match options with routing approach
Route requests step-by-step from the legacy system to new microservices describes step-by-step routing, which fits the pattern best.
Final Answer:
Route requests step-by-step from the legacy system to new microservices -> Option C
Quick Check:
Step-by-step routing = A [OK]
Hint: Route requests gradually, not all or random [OK]
Common Mistakes:
Routing all requests to legacy until full switch
Routing requests randomly causing inconsistency
Stopping legacy before new system ready
3. Consider this simplified request flow in a Strangler fig pattern:
Legacy system handles requests for features A, B, C.
New microservice replaces feature A.
Requests for A go to new service; B and C go to legacy.
What happens when a request for feature B arrives?
medium
A. It is routed to the new microservice handling feature A
B. It is routed to the legacy system since B is not replaced yet
C. It causes an error because feature B is missing in new service
D. It is dropped and not processed
Solution
Step 1: Analyze routing rules for features
Only feature A is replaced by the new microservice; B and C remain in legacy.
Step 2: Determine routing for feature B request
Requests for B still go to legacy system as it is not replaced yet.
Final Answer:
It is routed to the legacy system since B is not replaced yet -> Option B
Quick Check:
Feature B not replaced = legacy route = C [OK]
Hint: Unreplaced features stay on legacy system [OK]
Common Mistakes:
Routing all requests to new service regardless of feature
Assuming missing features cause errors
Dropping requests instead of routing properly
4. A team tries to apply the Strangler fig pattern but routes all requests to the new microservice before it fully supports all features. What is the main problem with this approach?
medium
A. It leads to inconsistent behavior as new service lacks some features
B. It causes downtime because legacy system is stopped too early
C. It improves performance by forcing early migration
D. It simplifies deployment by removing legacy dependencies
Solution
Step 1: Identify issue with premature routing
Routing all requests early means new service may not handle all features yet.
Step 2: Understand impact on system behavior
This causes inconsistent or failed responses for unsupported features.
Final Answer:
It leads to inconsistent behavior as new service lacks some features -> Option A
Quick Check:
Premature routing = inconsistent behavior = A [OK]
Hint: Route only supported features to new service [OK]
Common Mistakes:
Thinking early routing improves performance always
Assuming legacy can be stopped immediately
Ignoring feature support gaps
5. 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?
hard
A. Replace feature X first with a new microservice and route only X requests there, keep Y and Z on legacy
B. Replace all features at once to avoid partial routing complexity
C. Stop the legacy app and start new microservices for all features simultaneously
D. Keep all features on legacy until new system is fully ready, then switch all at once
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]
Hint: Migrate critical features first, route requests gradually [OK]