DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Enterprise AI Trend Report: Gain insights on ethical AI, MLOps, generative AI, large language models, and much more.

2024 Cloud survey: Share your insights on microservices, containers, K8s, CI/CD, and DevOps (+ enter a $750 raffle!) for our Trend Reports.

PostgreSQL: Learn about the open-source RDBMS' advanced capabilities, core components, common commands and functions, and general DBA tasks.

AI Automation Essentials. Check out the latest Refcard on all things AI automation, including model training, data security, and more.

Related

  • Event-Driven Architecture for Software Development: Leverage the Strength of Reactive Systems
  • Navigating Software Leadership in a Dynamic Era
  • Top 10 Software Architecture Patterns to Follow in 2024
  • Evolution of Software Architecture: From Monoliths to Microservices and Beyond

Trending

  • Machine Learning: A Revolutionizing Force in Cybersecurity
  • DZone's Article Types
  • Harnessing the Power of Observability in Kubernetes With OpenTelemetry
  • Top Secrets Management Tools for 2024
  1. DZone
  2. Culture and Methodologies
  3. Agile
  4. Architecture Patterns: Strangler Pattern

Architecture Patterns: Strangler Pattern

The Strangler Pattern enables gradual, low-risk software migration but demands careful balancing of two systems during the upgrade process.

By 
Pier-Jean MALANDRINO user avatar
Pier-Jean MALANDRINO
DZone Core CORE ·
Nov. 15, 23 · Review
Like (2)
Save
Tweet
Share
2.7K Views

Join the DZone community and get the full member experience.

Join For Free

The Strangler Pattern, first described by Martin Fowler, is a software architectural pattern that describes a method of gracefully migrating a legacy system incrementally rather than in a big-bang approach. It is named after the Strangler Fig, a type of vine that slowly grows on a tree and eventually replaces it. Similarly, in the software context, the Strangler Pattern involves building a new system around the boundaries of the old system, allowing you to slowly replace parts of the old system with components of the new system over time.  

Many Software engineers will be confronted with system migration in their careers; technology is growing faster, and humans need time to adapt and maintain their systems, which can become old sometimes even before they have time to finish it. A strangler pattern is an approach that allows migration without a big bang, which can be very stressful for teams and is often condemned to failure. This pattern is very efficient in the context of large systems because it allows people to gain confidence in the ability to make the migration, providing a multitude of small successes that are much harder to achieve in a one-shot.

The general approach is to identify areas of the old system that can be replaced and then gradually route new requests or functionality to the new system. At the same time, the old system still handles the legacy functionality. Over time, as the new system becomes more robust and feature-complete, more and more functionality is transitioned over until the old system can be safely retired.

Strangler Pattern

Benefits

  • Incremental Migration: Instead of a high-risk, big-bang release, you can migrate to the new system step by step, ensuring that the new components work properly before moving on.
  • Reduces Risk: By breaking down migration into smaller, manageable chunks, it reduces the risk associated with major changes.
  • Maintain Business Continuity: Throughout the migration process, the business can continue to operate using the existing system, ensuring that there’s no loss of functionality or downtime.
  • Facilitates Modernization: This pattern is particularly useful when transitioning from monolithic architectures to microservices, as you can gradually replace monolithic components with microservices.
  • Flexibility: Since the migration happens over time, it allows teams to adjust and refine their approach based on feedback from earlier migration stages. It is also suitable for use with modern software development methods such as Agile iterative methods.
  • Parallel Development: While the new system is being developed, changes can still be made to the old system if necessary.
  • Stakeholder Trust: Migrations are often a big deal for IT teams, especially because they represent a large investment with an ROI that can be difficult to measure. If accepted, small signs of dysfunction can make everyone very worried because of the high-risk situation from their point of view. In a sort of strangler pattern, with smaller chunks, the stress could be much more localized to a particular chunk or a bunch of chunks. That helps a lot to manage stress at a C level.
  • Focus on Business Value: By only migrating small parts, you can focus on the most important parts or those that will benefit the most from the migration. In this way, by migrating small parts of a monolithic system, you can enable completely new business for your company, simplify some critical points, etc.

Trade-Offs

  • Complexity: Managing two systems simultaneously can be complex. Ensuring compatibility, routing requests, and maintaining the state between the two can be challenging.

NB: Consider the case of an old system with executables and multiple local databases living alongside a modern centralized web application. Coordinating and versioning the databases will be very challenging.

  • Resource Intensive: Both the old and new systems might need to run concurrently, requiring additional infrastructure and maintenance resources.
  • Potential for Drift: As development progresses, there’s a risk that the new system might drift in terms of features or functionality from the old one, especially if changes continue to be made to the legacy system. 
  • Duration: The transition can be lengthy, especially for large, deeply integrated systems. This prolonged transition period can lead to increased costs and resource allocation for the migration.
  • Team Alignment: The team needs to be aligned in terms of goals, understanding of the legacy system, and the migration strategy to ensure successful implementation of the Strangler Pattern.

Conclusion

The Strangler Pattern emerges as a compelling approach for managing the evolution of software systems in a world where change is the only constant. By allowing for the gradual replacement of components of a legacy system, this pattern offers a strategic roadmap for organizations navigating the complexities of technological advancement.

The incremental nature of the pattern aligns well with contemporary Agile practices, affording teams the ability to adapt, inspect, and adjust throughout the migration process. This not only maintains business continuity but also helps in cultivating stakeholder trust by demonstrating consistent progress and reducing the anxiety associated with large-scale system overhauls.

However, the Strangler Pattern is not without its challenges. The complexities inherent in running and gradually transitioning between two systems should not be underestimated. It demands a disciplined approach to coordination, comprehensive testing, and a keen eye for maintaining feature parity where needed.

The key to a successful Strangler Pattern implementation lies in meticulous planning, clear communication, and a phased approach to deployment that prioritizes business value. It is an exercise in balance — between old and new, speed and stability, and investment versus return.

As software engineers, the Strangler Pattern equips us with a pragmatic framework for ensuring that our systems can evolve without disrupting the vital services they provide. In the lifecycle of software, the Strangler Pattern is not merely a method for system migration — it is a manifestation of the evolutionary nature of technology itself. It’s about ensuring that as our software matures, it can continue to support the ever-changing landscape of business needs, remaining robust, relevant, and resilient in the face of change.

Architectural pattern Architecture Software development agile systems Engineer

Published at DZone with permission of Pier-Jean MALANDRINO. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Event-Driven Architecture for Software Development: Leverage the Strength of Reactive Systems
  • Navigating Software Leadership in a Dynamic Era
  • Top 10 Software Architecture Patterns to Follow in 2024
  • Evolution of Software Architecture: From Monoliths to Microservices and Beyond

Partner Resources


Comments

ABOUT US

  • About DZone
  • Send feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: