In programming, the strangler fig pattern or strangler pattern is an architectural pattern that involves wrapping old code, with the intent of redirecting it to newer code or to log uses of the old code.
Coined by Martin Fowler,[1] its name derives from the strangler fig plant, which tends to grow on trees and eventually kill them.
It has also been called Ship of Theseus pattern, named after a philosophical paradox.
This is less risky and more incremental than swapping out the entire piece of software.
[1] The strangler fig pattern can be used on monolithic applications to migrate them to a microservices architecture.