Legacy system modernization means reworking software your business still depends on so it can be changed, secured and connected to other systems again. There are seven common ways to do it, from putting an API in front of the old system to rebuilding it or replacing it with a product, and most systems end up with a mix. What usually works best is replacing the system in slices while the old one keeps running, and treating the data, more than the code, as the main risk.
We're a small software team in Ankara, and several of our projects have involved systems someone else built. We took over the early codebase of Oplist, a client's hospital scheduling product, and rebuilt it. We kept Diderot, a course platform at Carnegie Mellon, current while classes ran on it, and we have spent years moving funeral homes' records out of old management systems. The examples below come from that work.
What makes a system legacy
Age is a weak signal. A twenty-year-old payroll program that nobody needs to change can be left alone. A three-year-old web app is already legacy if every change breaks something unrelated and the one person who understood it has left.
These are the signs worth checking:
- Changes take longer every year, and the team avoids certain modules.
- The runtime, framework or operating system is out of support, or soon will be.
- Other systems can only reach it through file exports, shared database tables or someone retyping data.
- Business rules exist only in the code, or in one person's head.
- You can't find developers who want to work on it.
Support dates are the easiest of these to check and the most often ignored. Python 3.10 reached end of life on 1 October 2026, and Microsoft ends support for .NET 8 and .NET 9 on 10 November 2026, after which neither gets security patches. The applications keep running; what stops is the fix for the next vulnerability. Moving from one supported version to the next is routine maintenance, while jumping five versions at once is a project of its own.
Being supported is also different from being easy to change. .NET Framework 4.8.1 is still supported as a component of Windows, and ASP.NET Web Forms runs only on .NET Framework. A Web Forms application still gets security fixes, but its only route to .NET 10 goes through rewriting the user interface. Visual Basic 6 is in a similar position: Windows 11 still supports the VB6 runtime for serious regressions and critical security issues, the VB6 development environment lost support in 2008, and Microsoft recommends replacing VB6 applications.
Leaving a system alone has a cost too. In July 2025 the US Government Accountability Office reported that federal agencies typically spend about 80 percent of their IT budget on operating and maintaining existing systems. Of the 11 critical legacy systems it identified, aged 23 to 60 years, eight use outdated languages and seven operate with known security vulnerabilities.
The seven options
The list most people quote comes from Gartner and has seven options, ordered roughly by how much they change. AWS's list for cloud migrations includes two more that are worth keeping in mind here: retire (switch it off) and retain (leave it as it is for now). A careful inventory usually finds that different parts of one system fit different options.
Option | What changes | When it fits | What to watch |
|---|---|---|---|
Encapsulate | Nothing inside; you add an API in front | The logic is sound and other systems need to reach it | The old limits stay, behind a nicer interface |
Rehost | Where it runs: new servers or cloud VMs | Leaving a data center, failing hardware | Same software, same problems, new bill |
Replatform | Runtime, database or OS version, with small code changes | The platform is going out of support but the code is fine | Small behavior differences between versions |
Refactor | The code's internal structure; behavior stays the same | The code slows every change but the design can be saved | Without tests you can't tell whether behavior changed |
Rearchitect | The system's structure, such as splitting out a module | One part needs to scale or ship on its own | Turns into a slow rebuild if nobody sets limits |
Rebuild | Everything except the scope and the data | The stack can't be upgraded and the system can be replaced in slices | Chasing feature parity; the data migration |
Replace | You buy a product instead | The function works the same as at every other company | Your process bends to the product; getting the data out |
Rehosting is infrastructure work, and so is much of replatforming; our cloud migration guide covers both. The rest of this post concentrates on the options that change the software itself.
How to choose
Go through these questions in order, for each major part of the system. The first yes is usually the answer for that part.
- Does anyone still use it? Usage logs, plus a conversation with the people who supposedly depend on a feature, often show that a module can be retired. Every feature you switch off is one you don't have to migrate.
- Is it a commodity? If your company does accounting, payroll or HR records the way everyone else does, buy a product and migrate the data into it. Our build versus buy guide goes through that decision.
- Is the logic fine but the platform dying? Replatform. On Diderot we upgraded the AWS Elastic Beanstalk platform and the Python version and rebuilt the staging and production environments during live semesters, and new teaching features kept shipping in the same period.
- Do other systems just need to reach it? Encapsulate. Put an API in front of it, and if several systems will call that API, put it behind an API gateway. For many stable systems that is all the modernization they need for years.
- Is the code itself what's stopping you, in an area that sets your business apart? Then refactor or rebuild, one slice at a time.
One approach we'd argue against is the big-bang rewrite of a system the business uses every day: a new system built in parallel for a year and switched on over a weekend. In Patterns of Legacy Displacement, Ian Cartwright, Rob Horn and James Lewis name the wish for feature parity (rebuilding everything the old system does before switching over) as a key factor in several failed replacements they saw. In those projects, agreeing what the old system currently does took a huge effort and led to plans for a single big-bang cut-over. Martin Fowler adds that much of that behavior turns out to be something nobody wants any more.
A rebuild rarely has to cover everything, either. Oplist is a client whose hospital shift-scheduling product we build. When we took over its codebase in November 2023, it had an early Flutter Web front end, a Flask backend and a MILP solver for the nurse rostering problem. We moved the application to a React front end and a Node.js/Express API on PostgreSQL. The solver runs as a separate Python service that we develop together with Oplist's team. Around it we added what hospitals needed to use the product every day: organizations and roles, approval workflows and email notifications. Oplist is now used at 5 to 10 locations and has generated schedules for more than 2,000 people.
Replacing in slices: the strangler fig pattern
Martin Fowler named this pattern after the strangler figs he saw in Queensland, which grow around a host tree until they replace it. It is the standard way to rebuild without a big bang, and Microsoft's write-up is a clear reference. In outline:
- Put a façade in front of the old system: a reverse proxy, an API gateway or a routing layer in the client. At first it sends all or nearly all requests to the legacy system.
- Choose a first slice that is valuable, fairly self-contained and easy to verify, and build it in the new system.
- Route that slice's traffic to the new system, for a small group of users first, and compare the results with the old one.
- Repeat until nothing reaches the old system. Then switch it off and, usually, remove the façade.
Two things decide whether it works. First, old and new have to run alongside each other, sometimes for a long time, so you write temporary code: adapters that translate between the old data model and the new one (Microsoft calls this an anti-corruption layer), sync jobs and routing rules. Engineers dislike writing code they plan to delete, but it costs less than a cut-over you can't roll back.
Second, you need a place to intercept requests. Microsoft lists the cases where the pattern doesn't fit: requests to the back end can't be intercepted, you can change neither the legacy code nor its database, the system is small enough to replace in one go, or the old system has to be gone quickly.
The data is the hard part
When we moved Oplist to React and Node.js, the two hardest parts were time and data integrity. That is typical: new code passing its tests is the easy milestone, and a migration is only finished when the old data has come across correctly and stays correct for as long as both systems are in use.
Copy once, then sync from the database log
The usual approach is a bulk copy (ETL) for the history, then change data capture (CDC) for whatever changes while both systems are live. CDC reads the database's transaction log, so it catches every committed change, including those made by scripts and stored procedures nobody mentioned. SQL Server has CDC built in, and Debezium does the same job for PostgreSQL, MySQL and other databases.
Avoid making the application write to both databases. When one write succeeds and the other fails, the copies drift apart, and that can go unnoticed for weeks. If the application has to publish its changes, write them to an outbox table in the same transaction and ship them from there.
Don't trust the source
Old systems hold duplicates, orphaned rows and records that contradict each other, and live sources are not much cleaner. Oplist exchanges data with private hospitals' HR and payroll systems through live API integrations. Those systems can contain duplicate records for the same staff member, and some leave types take precedence over others. So Oplist deduplicates staff and applies a precedence order to leave itself, instead of trusting each record as it arrives. A migration needs the same kind of rules: which of two duplicates wins, which status overrides which. Settle them with the people who own the data before the first rehearsal, and give each one a test.
Reconcile against numbers people already trust
Matching row counts prove very little: a migration can copy every row and still get amounts, dates or the links between records wrong. For Tribute Technology we built a platform that converts funeral homes' records from other vendors' systems (MSSQL backups, MySQL databases, CSV exports) into Tribute's format. Tribute's product owner judged success by matching the migrated data against accounts-receivable reports, case counts and spot checks. Pick the reports finance or operations already read, and keep going until old and new agree to the last cent.
A query like this, run against both databases and diffed, catches most problems early:
-- Run on the old and the new database, then diff the two outputs.
-- PostgreSQL syntax. SQL Server 2022+: DATETRUNC(month, issued_at);
-- MySQL: DATE_FORMAT(issued_at, '%Y-%m-01').
-- Bucket both sides in the same time zone: if the old system stored local
-- time and the new one stores UTC, invoices issued just after midnight on
-- the 1st land in different months and the totals won't match.
SELECT date_trunc('month', issued_at) AS month,
count(*) AS invoices,
sum(total_amount) AS total
FROM invoices
GROUP BY 1
ORDER BY 1;Make it re-runnable, and keep the business running
You will run the migration many times: on a copy, in rehearsals, on cut-over day and again after a fix. Tribute's platform keeps field mappings versioned so a conversion can be cloned and run again, with an approve-or-reject step before anything is exported. In our migrations for FrontRunner, which bring records over from seven different funeral management systems, every job is a ticket that gets checked, and is re-run or fixed during the client's launch when needed, because launch dates don't move.
The old process also has to keep working until the new one has proved itself. While the Tribute platform was being built, we ran 11 conversions by hand so onboarding never stopped. Tribute switched to the automated process in February 2023.
Plan for personal data
Rehearsals usually run on copies of production. If those copies contain personal data, mask it before it reaches a test environment, and check who can open that environment. If the new system will run in another country or cloud region, check the transfer rules before you choose the region. Under the GDPR, for example, moving personal data outside the EU/EEA needs an adequacy decision or a safeguard such as standard contractual clauses, and that can change the hosting decision.
Keeping the new system from becoming legacy
Most systems become legacy one skipped upgrade at a time. None of the fixes are exciting, and all of them are cheap if you keep doing them:
- Put support end dates in the calendar. .NET 10, the current long-term support release, is supported through November 2028, so plan the next upgrade well before then.
- Let a bot such as Dependabot or Renovate open dependency-update pull requests, and keep the tests good enough that merging them is boring.
- Write the business rules down outside the code, with examples, so whoever rewrites or replaces the system next can check their work against them.
- Set aside part of every month for maintenance instead of waiting for an outage to justify it.
Where to start
Before you pick an option, spend the first week on this:
- List every integration, file transfer, report and scheduled job that touches the system. Scheduled jobs are the easiest to miss, because nobody watches them run.
- Check the support dates of the runtime, framework, database and operating system.
- Write down the ten business rules you'd be most afraid to get wrong.
- Decide how you'll prove the data is right: which reports, which totals, and who signs off.
- Pick a first slice small enough to finish in a few weeks, and measure how long it really takes. That number will tell you more about the whole program than any estimate made up front.
If you'd like a second opinion on a system you're about to modernize, tell us about it.
Frequently asked questions
How long does legacy system modernization take?
It depends on the option. Putting an API in front of a system or upgrading its runtime can take weeks. Rebuilding a system the business runs on usually takes months or longer, delivered in slices.
Do we have to freeze new features during the migration?
Not for the whole system. Freeze changes to the slice you are moving, or agree that every change to it is made in both the old and the new system until the switch; otherwise the thing you are porting keeps changing under you. The rest of the system can keep shipping.
Can AI coding tools do the migration for us?
They can take on part of it: explaining unfamiliar code, drafting tests that pin down what the old system does today, and making repetitive changes such as API renames between framework versions. They can't tell you which behavior the business still needs, and they don't prove the data came across correctly. Review what they produce like any other pull request, and still reconcile against the reports people trust.
Related Articles
Kong vs Traefik vs AWS API Gateway: How to Choose
Kong, Traefik and AWS API Gateway compared as of October 2026: features, licensing, Kubernetes support and what AWS charges for 100 million requests a month.
Read More: Kong vs Traefik vs AWS API Gateway: How to ChoosegRPC vs REST for Microservices: When gRPC Is Worth It
When gRPC beats REST between services, what it adds to your operations (load balancing, deadlines, browser access), and what our own protobuf vs JSON test showed.
Read More: gRPC vs REST for Microservices: When gRPC Is Worth ItRPA Implementation: From Process Choice to Bots That Keep Running
Most of an RPA implementation is choosing the process and designing for exceptions. The order we work in, current license prices, and what broke in the n8n and LLM automation we built with an agency.
Read More: RPA Implementation: From Process Choice to Bots That Keep Running
