Monolith To Microservices Path: Strangler Architecture Pattern

Serhii Bohutskyi
2 min readJul 5, 2023

--

Strangler fig tree

In today’s fast-paced digital world, businesses constantly evolve, and their needs change more rapidly than ever. This constant evolution often puts a strain on legacy systems that were not designed to accommodate rapid change. That’s where architectural design patterns, specifically the Strangler Pattern, come into play.

What is the Strangler Pattern?

Coined by Martin Fowler, the Strangler Pattern is an approach to incrementally redesigning and replacing parts of an existing, monolithic application while ensuring that the application remains operational during the process. The name comes from the strangler fig tree, which grows around existing trees, gradually ‘strangling’ and replacing them.

The Strangler Pattern is a particularly effective way of dealing with large, monolithic applications that cannot easily be redesigned or replaced all at once. It allows developers to phase out parts of the old system while introducing new elements with minimal disruption to the overall application.

Source www.redhat.com

How Does It Work?

The Strangler Pattern works by gradually replacing specific parts of the system with new, improved parts until the entire system has been upgraded.

  1. Identify a specific part of the application that is to be replaced.
  2. Create a new service or component that will replace the identified part.
  3. Route the traffic from the old component to the new one. At this point, the application's old and new parts are running concurrently.
  4. Replace and gradually phase out the old component as confidence grows in the new component’s ability to handle the load.
  5. Repeat this process until all parts of the old system have been replaced.

Benefits of the Strangler Pattern

  1. Incremental Change: The Strangler Pattern allows changes to be made incrementally, reducing the risk of introducing errors into the system. This is far safer and less disruptive than attempting to replace the entire system simultaneously.
  2. Flexibility: The Strangler Pattern allows developers to use new technologies and techniques in the new parts of the application.
  3. Improved Quality: By gradually replacing old code, the overall quality of the codebase can be improved.
  4. Reduced Risk: The risk of a big-bang release is significantly minimized as the old and new systems co-exist for a period of time allowing for a smooth transition and gradual feature rollout.

Conclusion

While the Strangler Pattern requires a thoughtful, well-planned approach and can take time to implement fully, it provides a robust and flexible method for modernizing legacy systems. With its incremental, risk-averse methodology, this approach ensures continuous delivery of value, business continuity, and a smoother transition path from the old to the new.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response