Design Patterns (GoF) (50 Qs)•Part 3: Architectural Patterns & Enterprise Systems (25 - 35)
Strangler Fig Pattern: Incrementally modernizing legacy monolithic systems.
mid Leveldesign-patternsArchitectural Patterns
In Simple Words: Named after strangler fig trees that grow around host trees and gradually replace them:
- Instead of attempting a high-risk "Big Bang" rewrite of a 10-year-old monolith:
- Place an API Gateway / Reverse Proxy in front of the monolith.
- Implement new features or extract single domains (e.g.
/billing) as modern microservices. - Route
/billingtraffic at the API Gateway to the new microservice; route all other routes to the legacy monolith. - Gradually strangulate the monolith domain by domain until the old codebase is safely retired.