Logo
Grokking Microservices Design Patterns
Ask Author
Back to course home

0% completed

Introduction

What is Strangler Fig Pattern? It is an approach used in software development when transitioning from a monolithic architecture to a microservices architecture. The pattern is named after the strangler fig tree, which gradually grows around and eventually replaces existing trees. In the context of software engineering, it refers to the gradual process of replacing parts of a legacy system with new applications and services.

Image
Strangler Fig Tree

Imagine an ancient, humongous tree in a dense forest. This tree represents your old legacy system. One day, a new plant, the Strangler Fig, starts growing at the base of this tree. Over time, the fig grows, wrapping itself around the ancient tree. As it expands, it replaces more and more parts of the original tree until the old tree is entirely enveloped and replaced by the Strangler Fig.

This tree is a metaphor for legacy systems. These systems, often outdated yet deeply integrated, support critical business operations. They're like the old tree - rooted deeply within the organization's architecture, its many branches representing the various functions it supports. And replacing these systems can be just as daunting as replacing the old tree.

So how can we replace such deeply rooted legacy systems? There is a solution that allows you to gradually replace parts of the legacy system without causing business disruption. That solution is the Strangler Fig Pattern. It's named after the Strangler Fig, a tree that grows by gradually enveloping other trees, eventually replacing them.

What's It All About? The Strangler Fig Pattern in software design mimics the process of gradually replacing the legacy system. Instead of replacing a large, old system (the ancient tree) all at once, you build new parts (the Strangler Fig) alongside it. Gradually, the new system takes over functionalities from the old system until the old one can be safely retired.

Why Use the Strangler Fig Pattern?

With rapid technological advancement, organizations need to keep up with the latest technology to stay competitive. However, completely overhauling a legacy system can be risky and disruptive. Here's where the Strangler Pattern shines - it allows for the gradual replacement of a system, mitigating risk and minimizing disruption.

  1. Less Risky: You're not ripping out the old system in one go. So there's a safety net.
  2. Flexibility: You can prioritize which parts to replace based on urgency or business needs.
  3. No Big Bang Releases: Continuous delivery and gradual replacement mean less potential for massive failures.
  4. Smooth Transition: Users might not even notice the shift as it's gradual.
Mark as Completed