Plano, Texas uzair.ahmed@tellakin.com +1 (415) 340-0456
tellakin AI Powered | Human Driven

Legacy System Modernization: Strangler Fig and Other Strategies That Actually Work

Network switch with a tangle of patch cables
Photo: Switch-and-nest.jpg by Justin Smith, CC BY-SA 3.0, via Wikimedia Commons

Is it getting harder for you to hire developers who are skilled with your tech stack? Are security patches no longer available for the framework your core product is built on? Do simple changes take weeks because nobody fully understands the code anymore? These are the classic signs that a legacy system is turning from an asset into a liability.

The tempting response is a full rewrite. Unfortunately, big-bang rewrites have a poor track record: they take longer than planned, the old system keeps changing underneath them, and the business gets no value until the very end. This article describes the incremental approach we use in our Legacy System Modernization projects.

Legacy system modernization
Legacy systems often still carry critical business logic — modernize carefully.

What “legacy” really means

Age alone does not make a system legacy. A system becomes legacy when one or more of these is true:

  • It depends on unsupported runtimes, frameworks, libraries or operating systems.
  • Very few people can change it safely; knowledge is concentrated in one or two individuals.
  • It has no automated tests, so every change is risky.
  • It cannot scale or integrate with modern services and APIs.
  • Its operational cost — licenses, hardware, manual processes — keeps rising.
  • Hiring for its technology is increasingly difficult.

Step 1: Assess before you decide

A modernization assessment should answer:

  1. Business value: which capabilities matter most and which are rarely used?
  2. Technical health: code quality, test coverage, dependency age, known vulnerabilities, performance hotspots.
  3. Architecture: module boundaries, data ownership, integration points, batch jobs.
  4. Change hotspots: which parts of the code change most often? Version control history reveals where modernization will pay off first.
  5. Risk and constraints: regulatory requirements, uptime needs, budget and team skills.

The output is a map that classifies each component as keep, encapsulate, refactor, replace or retire.

Step 2: Pick the right strategy per component

StrategyDescriptionGood for
EncapsulateWrap the legacy component behind an APIStable logic that just needs to be reachable
Rehost / replatformMove to modern infrastructure with minimal code changeInfrastructure end-of-life
RefactorImprove structure without changing behaviorCode that is valuable but hard to change
Rebuild incrementallyReplace piece by piece (strangler fig)Core systems that need new capabilities
ReplaceAdopt a SaaS or packaged productCommodity functions
RetireRemoveUnused features — often a surprisingly large share

Step 3: Use the strangler fig pattern

The strangler fig pattern, named after a plant that gradually grows around a host tree, lets you replace a system incrementally:

  1. Put a façade in front of the legacy system — an API gateway, reverse proxy or routing layer that all clients go through.
  2. Choose a thin slice of functionality with clear boundaries and high value.
  3. Build the new implementation of that slice using modern technology.
  4. Route traffic for that slice to the new implementation; everything else still goes to the legacy system.
  5. Repeat until the legacy system handles nothing and can be switched off.

Each step delivers value, can be released independently and can be rolled back by changing a route. The business never waits years for a big reveal.

Start where change happensThe best first slices are areas that change often, cause frequent incidents, or block new business capabilities — not the easiest code to rewrite.

Step 4: Protect the new world with an anti-corruption layer

Legacy systems often have awkward data models and naming. If new services talk to them directly, the legacy concepts leak into your modern code. An anti-corruption layer translates between the two models so that new components can be designed cleanly.

Step 5: Handle the data

Data is typically the hardest part of modernization:

  • Shared database first: early slices may still read and write the legacy database, which keeps behavior consistent but couples the systems.
  • Data ownership: gradually move each data set to the service that owns it.
  • Synchronization: use change data capture or events to keep old and new stores in sync during the transition.
  • Validation: run reconciliation jobs that compare results from both systems.

Step 6: Build a safety net of tests

Before refactoring code with no tests, add characterization tests that capture current behavior — even behavior that looks wrong — so you notice unintended changes. Add contract tests for APIs and end-to-end tests for critical journeys. Running old and new implementations in parallel and comparing outputs (“shadow traffic”) is a powerful technique for high-risk components.

Step 7: Modernize delivery, not just code

Modern code delivered through manual, monthly releases is still slow. Invest in:

  • Version control hygiene and trunk-based development
  • Continuous integration with automated tests and security scans
  • Infrastructure as Code
  • Automated deployments with feature flags and fast rollback
  • Observability: logs, metrics, traces

Step 8: Bring the team along

Your existing team, entrenched with the legacy code, holds irreplaceable domain knowledge. Modernization succeeds when they lead it. Pair them with engineers experienced in the target architecture, document decisions in lightweight architecture decision records, and use an AI assistant indexed on the legacy code and documentation to speed up understanding. Our article on RAG vs fine-tuning explains how such assistants work.

Microservices: a tool, not a goal

Breaking a monolith into dozens of microservices can create a distributed system that is harder to run than the original. Often a modular monolith — one deployable with strong internal boundaries — is the right intermediate or even final state. Extract a service only when it needs independent scaling, deployment or ownership.

Measuring progress

  • Percentage of traffic or features served by the new platform
  • Lead time for changes and deployment frequency
  • Incident rate and mean time to recovery
  • Infrastructure and license cost
  • Number of unsupported dependencies remaining

Conclusion

It might be time to invest in getting rid of those out-of-support libraries and frameworks. Done incrementally, modernization reduces risk from the first month, delivers visible value along the way and leaves your team stronger.

Book a free consultation and we’ll help you build a modernization roadmap — and do it right, one slice at a time.

Related articles

Need help putting this into practice?

Book a free consultation — we will review your goals and suggest the most practical path forward.

Leave a reply

Your email address will not be published. Required fields are marked *