<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/repay-tech-debt-with-the-strangler-fig-pattern-z57wnfd3i" -->

---
title: Repay Tech Debt with the Strangler Fig Pattern | daily.dev
description: The strangler fig pattern offers an incremental alternative to risky full rewrites of legacy systems: create a seam, intercept requests, gradually redirect...
canonical: https://daily.dev/posts/repay-tech-debt-with-the-strangler-fig-pattern-z57wnfd3i
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Repay Tech Debt with the Strangler Fig Pattern | daily.dev
og:description: The strangler fig pattern offers an incremental alternative to risky full rewrites of legacy systems: create a seam, intercept requests, gradually redirect...
og:url: https://daily.dev/posts/repay-tech-debt-with-the-strangler-fig-pattern-z57wnfd3i
og:image: https://api.daily.dev/og/posts/Z57wnfd3I.png
og:image:alt: Repay Tech Debt with the Strangler Fig Pattern
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Repay Tech Debt with the Strangler Fig Pattern

**[RUBYLAND](https://daily.dev/sources/rubyla)** · 17 min read · 2 upvotes · 4 comments

## Summary

The strangler fig pattern offers an incremental alternative to risky full rewrites of legacy systems: create a seam, intercept requests, gradually redirect traffic to new implementations, and decommission old code path by path. The post explains the mechanics, data ownership strategies during transition (legacy as source of truth, new system ownership, synchronization, or event propagation), and risk mitigation via feature flags, shadow traffic, and reconciliation jobs. A detailed Rails example walks through migrating order-notification logic from a legacy mailer to a new event-driven service using ActiveSupport::Notifications, including shadow comparison logging before cutover and final removal of legacy code. Common failure modes are also covered, such as choosing the wrong migration boundaries or migrating too many areas simultaneously.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.fastruby.io/blog/how-the-strangler-fig-pattern-helps-teams-pay-down-technical-debt.html>

## Questions this post answers

### What is the strangler fig pattern for migrating a legacy application?

It is an incremental migration approach where a seam intercepts requests and routes them to either the legacy system or a new implementation, one capability at a time, decommissioning the old code path once each piece is validated. This avoids a risky all-at-once rewrite by letting old and new systems run side by side, with traffic shifted gradually as confidence grows.

_Teams weighing a legacy rewrite versus incremental migration can find pattern breakdowns like this on daily.dev._

### How do you validate a new implementation during a strangler fig migration before cutting over customer traffic?

Send real production requests as shadow traffic to the new implementation without using its response, then compare its logged output against the legacy system's actual output for the same events, flagging mismatches in content, timing, or recipients. Once mismatches drop to zero or an accepted baseline, a feature flag controls the actual cutover, starting with internal accounts before wider rollout.

_Engineers designing safe rollout strategies for legacy migrations can track techniques like shadow traffic on daily.dev._

### Why does technical debt remain even after building a modern replacement system?

Technical debt is only reduced once the corresponding legacy capability is fully removed, not merely built alongside; if the old code path stays active, the organization must maintain both implementations, which can increase complexity rather than reduce it. Decommissioning the legacy code should be treated as part of the definition of done for each migration step.

_Developers planning to actually pay down legacy debt, not just add new code, can follow guidance like this on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@robertoumbelino** · 1 upvotes

> Incremental migrations are usually less exciting than rewrites, but much safer. The hardest part is choosing the right boundary

**@rizzdev** · 0 upvotes

> Picking the seam is choosing what done means for a slice. Teams optimize for clean architectural boundaries and end up migrating the simplest parts first. The gnarly business logic that actually needs replacing sits behind the hardest seam, and it is still there when you finish.

**@leonidbugaev** · 0 upvotes

> Shadow traffic is the part that actually pays the debt. The new path looking done is cheap. The old mailer had years of don't-send-twice, don't-drop-the-retry, don't-change-the-subject-on-a-refund sitting in production, not in the suite. If the shadow compare only logs the fields you remembered to log, mismatches drop to zero and you still cut over a thinner system. Freeze those obligations as checks first, then delete the legacy path.

## Similar posts on daily.dev

- [The strangler fig pattern: modernizing without a big-bang rewrite](https://daily.dev/posts/the-strangler-fig-pattern-modernizing-without-a-big-bang-rewrite-bji9lixdt) · Netguru · 35 upvotes · 6 comments
- [Redesign without fear](https://daily.dev/posts/redesign-without-fear-4bs4ays3m) · ploeh blog · 6 upvotes · 1 comments
- [Strangler Fig Pattern in C\#: Refactoring a Monolith to Microservices](https://daily.dev/posts/strangler-fig-pattern-in-c-refactoring-a-monolith-to-microservices-mpwi8kfwk) · We Are .NET · 12 upvotes · 1 comments
- [How to Move from Monolith to a Service Based Architecture](https://daily.dev/posts/how-to-move-from-monolith-to-a-service-based-architecture-8wr0lttmy) · System Design Codex · 74 upvotes · 3 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#rails](https://daily.dev/tags/rails), [#technical-debt](https://daily.dev/tags/technical-debt)

[View this post on daily.dev](https://daily.dev/posts/repay-tech-debt-with-the-strangler-fig-pattern-z57wnfd3i)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Repay Tech Debt with the Strangler Fig Pattern","url":"https://daily.dev/posts/repay-tech-debt-with-the-strangler-fig-pattern-z57wnfd3i","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/repay-tech-debt-with-the-strangler-fig-pattern-z57wnfd3i"},"datePublished":"2026-08-28T13:51:13.084Z","dateModified":"2026-09-13T21:11:53.289Z","description":"The strangler fig pattern offers an incremental alternative to risky full rewrites of legacy systems: create a seam, intercept requests, gradually redirect...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2f217c09438937c509b136a3e32f0034?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2f217c09438937c509b136a3e32f0034?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"RUBYLAND","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"RUBYLAND","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/rubyla","url":"https://daily.dev/sources/rubyla"},"commentCount":4,"discussionUrl":"https://daily.dev/posts/repay-tech-debt-with-the-strangler-fig-pattern-z57wnfd3i","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":4}],"keywords":"architecture,rails,technical-debt","timeRequired":"PT17M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"RUBYLAND","item":"https://daily.dev/sources/rubyla"},{"@type":"ListItem","position":3,"name":"Repay Tech Debt with the Strangler Fig Pattern"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/repay-tech-debt-with-the-strangler-fig-pattern-z57wnfd3i","comment":[{"@type":"Comment","text":"Incremental migrations are usually less exciting than rewrites, but much safer. The hardest part is choosing the right boundary","datePublished":"2026-08-31T10:47:13.439Z","url":"https://daily.dev/posts/Z57wnfd3I#c-mCYhZIGek","author":{"@type":"Person","name":"Roberto Umbelino","url":"https://daily.dev/robertoumbelino","image":"https://avatars.githubusercontent.com/u/17939056?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Picking the seam is choosing what done means for a slice. Teams optimize for clean architectural boundaries and end up migrating the simplest parts first. The gnarly business logic that actually needs replacing sits behind the hardest seam, and it is still there when you finish.","datePublished":"2026-08-31T12:45:51.452Z","url":"https://daily.dev/posts/Z57wnfd3I#c-4lQE38Hmz","author":{"@type":"Person","name":"Andrew","url":"https://daily.dev/rizzdev","image":"https://media.daily.dev/image/upload/s--35vRfXAA--/f_auto/v1785413727/avatars/avatar_fQ7ttCKtPuu6tDvcgQXv5?_a=BAMAMicg0"}},{"@type":"Comment","text":"Shadow traffic is the part that actually pays the debt. The new path looking done is cheap. The old mailer had years of don’t-send-twice, don’t-drop-the-retry, don’t-change-the-subject-on-a-refund sitting in production, not in the suite. If the shadow compare only logs the fields you remembered to log, mismatches drop to zero and you still cut over a thinner system. Freeze those obligations as checks first, then delete the legacy path.","datePublished":"2026-08-31T09:42:49.002Z","url":"https://daily.dev/posts/Z57wnfd3I#c-HblfhZar0","author":{"@type":"Person","name":"Leonid Bugaev","url":"https://daily.dev/leonidbugaev","image":"https://lh3.googleusercontent.com/a/ACg8ocLhMgurwTmJElWaH9A8Ju8cHvZxgMCDt009jEYkmFCyUGAoaGSw=s96-c"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/repay-tech-debt-with-the-strangler-fig-pattern-z57wnfd3i#faq","mainEntity":[{"@type":"Question","name":"What is the strangler fig pattern for migrating a legacy application?","acceptedAnswer":{"@type":"Answer","text":"It is an incremental migration approach where a seam intercepts requests and routes them to either the legacy system or a new implementation, one capability at a time, decommissioning the old code path once each piece is validated. This avoids a risky all-at-once rewrite by letting old and new systems run side by side, with traffic shifted gradually as confidence grows. Teams weighing a legacy rewrite versus incremental migration can find pattern breakdowns like this on daily.dev."}},{"@type":"Question","name":"How do you validate a new implementation during a strangler fig migration before cutting over customer traffic?","acceptedAnswer":{"@type":"Answer","text":"Send real production requests as shadow traffic to the new implementation without using its response, then compare its logged output against the legacy system's actual output for the same events, flagging mismatches in content, timing, or recipients. Once mismatches drop to zero or an accepted baseline, a feature flag controls the actual cutover, starting with internal accounts before wider rollout. Engineers designing safe rollout strategies for legacy migrations can track techniques like shadow traffic on daily.dev."}},{"@type":"Question","name":"Why does technical debt remain even after building a modern replacement system?","acceptedAnswer":{"@type":"Answer","text":"Technical debt is only reduced once the corresponding legacy capability is fully removed, not merely built alongside; if the old code path stays active, the organization must maintain both implementations, which can increase complexity rather than reduce it. Decommissioning the legacy code should be treated as part of the definition of done for each migration step. Developers planning to actually pay down legacy debt, not just add new code, can follow guidance like this on daily.dev."}}]}
```

