migration legacy elixir

Legacy Software Modernization: An Honest Guide

Daniil Popov November 26, 2026

Your company runs on a system somebody built fifteen years ago. It works. Orders come in, invoices go out. But a small change takes months, one person really understands it, and the support bill goes up every year. At some point somebody has to decide what to do with it. If that's you, owner or CTO, this post is for you.

Full disclosure: I run an Elixir agency that rebuilds legacy systems, so I'm biased toward rebuilding. Check every claim, the links are there for that. I'll also tell you when a rebuild is the wrong call, including when you shouldn't hire anyone like us. Before the agency I was a CTO: I scaled a European logistics platform to millions of shipments in 30+ countries and ran an engineering org of 50+ people. So most of this I learned on the buying side, signing the invoices.

Short version: don't rewrite everything at once. First find out what the system really does and what nobody uses. Then keep it, buy something instead, or rebuild it one module at a time while the old one keeps running.

What's the plan?

  • Signs the old system costs more than it shows
  • Six options and when each one is right
  • Why big bang rewrites go wrong, and the strangler pattern step by step
  • Pilot module, what to throw away, data
  • Cost drivers, vendor questions, checklist, FAQ

What legacy actually means

Age is not the point. A system is legacy when the business is afraid to change it. Age just makes that more likely: the original developers left, the framework stopped getting updates, and twenty years of quick fixes sit on top of each other. Modernization means getting back to a system you can change without fear, and keeping the business rules buried inside the old one.

The old system costs more than it shows

Licences and hosting are the part you see on an invoice. The expensive part usually has no invoice at all.

Key person risk

Simple question: if the one or two people who know the system left tomorrow, what happens? If the honest answer is "we'd be in trouble", that risk is on your balance sheet whether anyone wrote it down or not. Worse if that person is close to retirement, or works for a vendor you'd like to leave.

Unsupported runtime

Every system stands on an operating system, a runtime, a database and a framework. Once one of them stops getting security fixes, the clock is running. Python 2 support ended on 1 January 2020, with no fixes after that, security problems included. If your system needs a runtime like that, you're on borrowed time.

Every change is slow

Adding a field to a form takes a month? A new price rule waits for a release window? Developers say "we don't touch that part"? This one hurts most, because it never shows on a report. It shows up as the product you didn't launch and the customer request you said no to.

Security and compliance

Old systems come with old dependencies, shared admin passwords and data flows nobody has drawn. In the EU that's no longer just IT's problem. The NIS2 Directive had to be in national law by 17 October 2024, and it asks medium and large entities in 18 critical sectors to manage cybersecurity risk and report significant incidents.

We saw this ourselves. On the accounting SaaS we rebuilt, drawing the data flow diagram for a compliance audit took longer than fixing the issue that triggered the audit. After the rebuild the audit scope roughly halved, because there was less to map.

Quick test. If three or more of these are true, you're already paying more than you think:

  • Only one or two people can safely change it.
  • Its runtime, framework or OS no longer gets security updates.
  • Small changes take weeks and often break something else.
  • Staff keep spreadsheets or manual steps next to it.
  • You couldn't draw its data flows for an auditor in one afternoon.

Six options, honestly

AWS lists seven migration strategies for the cloud. For a business system that's 10 to 20 years old, I find six options easier to reason about.

1. Keep and patch

Leave it as is, fix what breaks, update what you can. Right more often than consultants admit. Stable system, supported runtime, rare changes, and the people who know it are staying? Then a modernization project solves a problem you don't have. Write the risks down and look again in a year.

2. Rehost (lift and shift)

Same system on new servers or in the cloud, no code changes. Good when the hardware is what's on fire: a dying server, a data centre contract that ends. The code is exactly as hard to change as before, and an old runtime stays old.

3. Refactor in place

Improve the existing code step by step: upgrade the framework, add tests, split the worst parts. (AWS uses "refactor" for re-architecting an app for the cloud. I mean the older sense: change the structure, keep the behaviour.) Works when the technology is still alive and you have people who know it. When the platform itself is dead, you're polishing something with no future.

4. Replace with off the shelf software or SaaS

If the system does what every company in your sector does (accounting, payroll, a standard CRM), buy it, and let somebody else handle updates and security. The catch: your processes have to fit the product, and you still migrate data and train people. If the system is custom because your business really is different, SaaS makes you give that up.

5. Big bang rewrite

Build a complete new system next to the old one, switch everyone over on one date. Looks clean on a slide. For anything big it's the riskiest option here, more on that below. For small systems it's fine.

6. Incremental rebuild with the strangler pattern

Rebuild one module at a time. The old system stays in production, and each module moves over only when its replacement works. This is what we do, so apply the bias filter. It fits when the system is too big or too important to switch in one go, the business rules are your own, and the old technology has no future.

Option Fixes Doesn't fix Right when
Keep and patch Nothing new, lowest spend today Key person risk, slow change Stable system, supported runtime, rare changes, the people stay
Rehost Old hardware, hosting contracts Code, runtime, speed of change The servers are the urgent problem
Refactor in place Code quality, tests A dead platform The technology is alive and you have the people
Off the shelf / SaaS Updates, security, hosting Custom processes Your process is standard for your sector
Big bang rewrite Everything, on paper Risk, no value until cutover The system is small
Strangler rebuild Platform, code, UI, key person risk Bad data, rules nobody wrote down Large custom system that must keep running, with a place to route traffic

My rule of thumb: decide per part of the system. Payroll can go to SaaS while the order flow that makes you money gets rebuilt.

Why big bang rewrites go wrong

The famous warning is from 2000. Joel Spolsky called Netscape's rewrite from scratch the single worst strategic mistake that any software company can make. When he wrote it, Netscape had gone almost three years without a major release. His point still holds: old code looks messy because it carries years of bug fixes learned in production, and a rewrite throws them away.

Martin Fowler says it from the consulting side. Of the plan to build a full replacement and switch over, he writes that he and his colleagues have seen it go down in flames most of the time. From what I've seen, it breaks in the same places:

  • You pay for a year or more and can't use any of it until cutover day.
  • The business can't freeze for a year, so the old system keeps changing and the new one keeps chasing it.
  • The plan says "do everything the old system does", so you rebuild features nobody uses. Thoughtworks authors call this Feature Parity and name it as a key factor in several failed replacement projects.
  • Many business rules live in no document. You find them after cutover, from angry customers.
  • All the risk lands on one weekend, and rolling back is hard once new data is written.

One honest exception. Microsoft's guidance says the strangler approach might not be suitable for a small system that's simple to replace whole. Our documented project was exactly that: a B2B accounting SaaS rebuilt in three weeks, with 63% less code, 76% fewer files and 83% fewer Docker services (case study). Three weeks of risk is a different bet than eighteen months of it. For a 15 year old ERP with 200 users I wouldn't do it that way.

The strangler pattern, step by step

The name is Martin Fowler's. On a trip to the Queensland rain forest in 2001 he saw strangler figs, vines that start in a nook of a host tree and grow until they stand on their own. A couple of years later he wrote it up as the Strangler Application, now titled Strangler Fig: build new code next to the old system and move behaviour into it piece by piece. With the old system in production the whole time, it looks like this:

  1. Put a router in front. A thin layer (Microsoft's pattern page calls it a facade) that every request goes through. On day one it sends everything to the old system. Nobody notices.
  2. Build one module new. At first it can read and write the old database, so both systems see the same data.
  3. Compare before you switch. Run the new module next to the old one on a copy of real data and check totals, documents, emails. Fix the differences first.
  4. Switch that module's traffic to the new code. Everything else still goes to the old system. While both still use the old database, switching back should be one config change.
  5. Move that module's data. Copy, keep in sync, check it matches, then make the new side the source of truth. From here, switching back means copying new writes back to the old tables, so plan that before.
  6. Delete the old module's code and tables, only after the new one is validated.
  7. Repeat. Each module tends to go faster, because the router, deploys and data checks already exist.
  8. When nothing goes to the old system anymore, remove the router and switch the old system off.

Two notes. During the transition the old and new systems often call each other, so put a small translation layer in between and keep the old data model out of the new code. Microsoft calls it an anti-corruption layer. And the pattern needs a place to intercept requests. A web app almost always has one. A closed desktop tool with no source code and no accessible database may not.

On Rails, Node or Python? The monolith migration page shows how we do this for those stacks.

Picking the pilot module

The first module decides whether there will be a second one. Pick it to learn and to earn trust. What I look for:

  • Real users with real pain. If nobody notices the improvement, nobody funds the next step.
  • Clear edges: a few tables, few calls into the rest of the system.
  • Small enough to finish in weeks, so you can stop if it doesn't work.
  • Measurable before and after: time per task, errors, support tickets, time to ship a change.
  • Next to the heart of the business. Don't start with the general ledger or the pricing engine.

Our first rebuild step is always one pilot module like this, at a fixed scope and price. If it doesn't convince you, you stop, and you keep a working module and a clearer map of your system.

Throw things away first

Cheapest step of the whole project, and the one I see skipped most often. Every feature you drop is one you never rebuild, test, migrate or maintain again.

How much is there to drop? Pendo looked at feature usage across 615 of its customer subscriptions and reported that 80% of features are rarely or never used. Grain of salt: those are commercial software products, and Pendo sells the tool that measures exactly this. But old internal systems look the same to me, full of features built for one customer, one manager or one project that ended long ago. To find them:

  • Read the access logs. Which screens and reports did nobody open last year?
  • Check which tables haven't seen a new row in years.
  • Sit next to people for a day while they work. You'll see what they use and what they route around.
  • Ask each department head which reports they'd miss, then check if anyone opens them.

Put it on one list and let the business owner decide, it's their call. Records you must keep for legal reasons can often go to a read only archive instead of the new system.

Data migration

Code you can write again. Data you can't, and old databases are full of surprises: duplicate customers, free text in date fields, rules hidden in triggers. What works for us:

  • Start from the schema, not the code. It shows what the system stores, whatever the docs say.
  • Clean duplicates and broken records as a separate step, with the business deciding what's right.
  • Move data per module, together with the module, and keep it in sync until the new side takes over.
  • Reconcile with numbers: row counts, sums, open balance per customer. Totals don't match? You're not done.
  • Keep the old tables until the new module has run in production and the numbers match.

What drives the cost

I won't give you a price per module or per line of code. Anyone who quotes one before seeing your system is guessing. What makes a project expensive:

  • How much is left after you throw things away. That's why removal goes first.
  • Integrations. Every bank, tax authority, supplier or internal tool you connect to needs its own work and testing.
  • Data quality. A clean model is cheap to move, twenty years of free text is not.
  • Rules nobody wrote down, which someone has to dig out of the code and confirm.
  • Access to the people who know the old system. One hour with the author can save days of reading code.
  • Compliance: audit trails, retention, access control, and proving them.
  • Two systems running at once during the transition, and maintenance after launch.

To budget without betting the company: pay for an audit first (what the system does, what nobody uses, a phased plan with costs), fund one pilot at a fixed scope and price, and approve each next phase on the result of the last one. Then compare it with doing nothing: support contracts, salaries spent on workarounds, delayed projects.

My advice: never have more money at risk than one phase. If a vendor needs the whole budget up front, that tells you how they plan to work.

Questions to ask a vendor

  • What do you need to see before you give us a plan, and what does that cost?
  • What's the first thing in production, and when?
  • How does the old system keep running while you work? What's the rollback plan?
  • How do you migrate and reconcile data? Can you show a past example?
  • Who exactly works on our project? Are they the people in this call?
  • Who owns the code, and can we take it to another vendor?
  • When would you tell us not to do this project?

The last one matters most. A vendor who can't name a case where they'd say no will say yes to everything. (Ours are options 1 and 4 above. Yes, we do turn work down.)

Checklist

List who can change the system today, and what happens if they leave.
Write down the end of support date of every runtime, framework, database and OS it depends on.
Measure how long a small change takes, from request to production.
Find features, reports and tables nobody touched in a year.
Decide per part: keep, rehost, refactor, buy or rebuild.
Pick a pilot module with real users, clear edges and a measurable result.
Agree on a fixed scope and price for the pilot.
Plan data sync, reconciliation and rollback before the first switch.
Budget for two systems during the transition and maintenance after.
Make sure the contract says you own the code.

How we do it

Here's what we sell, so you can hold it against everything above. We audit the system and mark what nobody uses, and you decide what goes. We rebuild the rest in Elixir with a modern interface, using the strangler pattern, so the old system stays in production until every module has moved. The rebuild starts with one pilot module at a fixed scope and price. After launch the same team can stay on retainer to maintain it.

We're in Luxembourg and work with companies in Luxembourg, Switzerland, Germany and the Benelux. Comparing stacks? I wrote these too: Elixir vs Rails, Elixir vs Node.js, FastAPI vs Elixir and the Elixir tech stack.

FAQ

What is legacy software modernization?

Turning a business system you're afraid to change into one you can change safely, without losing the rules inside it. That can mean keeping it, moving it, buying a replacement or rebuilding it.

Rewrite or refactor?

Refactor when the technology is still supported and you have people who know it. Rebuild when the platform has no future: in pieces for a large system, in one go for a small one.

What is the strangler pattern?

A router sends each request to the old or the new system, and modules move over one at a time until the old system can be switched off. Martin Fowler named it after the strangler fig.

Can the old system keep running?

Yes, that's the point of the incremental approach. Each module switches only when its replacement works, with a way back.

How much does it cost?

It depends on how much you keep, how many integrations you have and the state of the data. An audit and a fixed price pilot give you real numbers before you commit to more.

How long does it take?

A first module can be in production a few weeks after the audit. The rest depends on what's left after you drop unused features.

Not sure which option fits your system? Tell us about it. If the honest answer is "keep it", you'll hear that too.

Resources

Share