What is Strangler Fig Pattern?
How it can help you when migrating from an old complex system to a new system say microservices?
What is its advantages and key areas to consider before using it?
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Editor's Notes
Strangler Fig Pattern
What is it?
Incrementally migrate a legacy system by gradually replacing pieces of functionality
New system eventually replaces all of the old system's features, strangling the old system
Context
Generally not advisable to completely replace a complex system in one go.
You should gradually migrate to new system.
But this means that for a long period of migration phase you will have 2 systems, one is new system where functionalities have migrated and other is old system where we still have functionalities which are yet to be migrated.
Problem
Solution
Gradually replace the old system with new system by incrementally moving functionalities.
Create an interface to interact with your systems (old and new).
Clients will call this interface and this interface will know where the related functionality required by client lies (in old or new system). This interface is called Strangler Facade.
So while features are migrated, clients are not impacted now.
Advantages
Helps to minimize risk from the migration
Development effort can spread over time.
Considerations
Consider how to handle services and data stores that are used by both new and legacy systems.
When the migration is complete, the strangler fig facade will be removed or evolve into an adaptor for legacy clients.
During migration process facade may need more changes
Facade should not become a single point of failure or a performance bottleneck.
When to use
Gradually migrating a back-end application to a new architecture.
When Not to use
Requests to the back-end system cannot be intercepted.
Smaller systems which can be replaced in single step
Created By
Rakesh Kalra
rakesh.kalra@thinkscholar.com
https://thinkscholar.com
https://linkedin.com/in/rakesh-kalra