Old systems tend to produce the same standoff. The business sees something that works: customers are served, invoices go out, and changing it costs money that could go elsewhere. IT sees a codebase that gets harder to touch every year and would happily start again on a current stack. Both sides have a point, and leaving the system alone or rewriting it from scratch are rarely the only two options.
My position is this. Start from the business problem the system is causing and choose the intervention that addresses it. For large systems that carry real business load, incremental displacement is usually the safer default, though not the only valid choice. And agree at the start what finished means, so that modernization has an end instead of becoming a permanent renovation.
A baseline both sides own
Without a starting point it is hard to say later whether the effort paid off. Different parts of an organization often want quite different things from the same modernization, so agreeing the priority outcomes comes first.[2]
The baseline is mostly about consequences. How much time and effort does a representative business change take, from request to production? Which work happens outside the system, in spreadsheets, re-keyed data or a local database, because the system no longer fits how people work? Users usually know where those shadow processes are, so ask them. What does running and supporting the system cost, including the hours spent keeping it alive? How much knowledge sits with one person, and which frameworks or platforms are already unsupported?
An honest description of how long a typical change takes, and why, is more useful than precise-looking numbers nobody trusts. The business should help define both the baseline and the target, so that both sides recognise the end when it comes.
Choose the intervention from the problem
It helps to separate strategy, meaning what to do with a system or capability, from execution patterns, meaning how to get there safely. Strangler Fig is a way of carrying out a replacement. It does not decide whether replacement is right.
The strategic options are broader than keep or rewrite. A stable, cheap, rarely changed system can be retained, with a deliberate review of its support status and risks. Parts that change often can be encapsulated and refactored behind a clear interface. Infrastructure can move, but only when hosting or operations is the measured problem and the full cost of the move has been counted; a lift and shift does not make code easier to change. Commodity capability can be bought. Unused capability can be retired once you have checked who still depends on it, including reports and downstream jobs, and what data must be retained.
A rewrite has its place too: when the scope is bounded, current behaviour is understood well enough to specify, and the cost of the transition is acceptable. Martin Fowler’s caution is about replacing a serious system wholesale, which takes long enough that users cannot wait for new features, while existing behaviour turns out to be hard to pin down.[1] A small component with clear behaviour and few consumers carries much less of that risk, though not none. The risk grows with scope, uncertainty and the time before the new code carries real work.
Replacing gradually
The Strangler Fig approach starts with small additions built beside the legacy code base and moves behaviour across piece by piece, until the old system has nothing left to do.[1] It does not require microservices. The new code can be a module in the same application, a separate service or a product behind an integration.
Inside a single codebase, branch by abstraction does similar work at a smaller scale. You put an abstraction layer between the calling code and the part to be replaced, move callers onto it, build a new implementation behind the same layer and switch callers over gradually, releasing regularly throughout. Once migration is complete, the old implementation is deleted, and the abstraction can go too if it no longer earns its place.[3]
The first slice should matter to users, or nobody will notice when it ships and sponsorship fades. It should not be the most critical process either, because mistakes are expensive while the team is still learning how the system is wired. Between those, look for dependencies the team can understand and a failure the team can recover from. Coupling metrics show where dependencies are dense, which makes them a useful risk signal, but they cannot pick a slice on their own.
Feature work continues during all of this. A replacement programme that runs separately from day-to-day delivery tends to drift away from what the business actually needs.[2] One shared set of priorities, agreed by business and technical people, lets new features land in the new structure where possible and orders the work by business urgency and by the areas the team is already touching. There is no hidden spare capacity and no universal percentage to reserve. The split has to be negotiated and revisited.
Coexistence costs something. Routers, adapters and synchronisation code are real software to build, test and operate. This is transitional architecture, and the lower risk and earlier value of the gradual approach usually justify it.[1] Each temporary piece still needs a stated removal condition from the day it is built, or it becomes permanent.
Technology is also only part of the problem. If the same organization builds the new system with the same handoffs and the same unclear ownership, it will recreate the same constraints on a newer stack. Business ownership of outcomes and smaller, more frequent releases matter as much as the framework choice.
Shadowing, canaries and experiments
Take a hypothetical case. A cost-calculation module encodes rules that no longer match how the business works, and a new module has been written to replace it. Three techniques can help move users across. Their mechanics overlap, but each answers a different question.
Shadow comparison asks whether the new implementation behaves as expected on real inputs. The old module keeps answering users while the new one receives a copy of each request, and its results are recorded and compared but never shown. Google’s SRE workbook describes this as traffic teeing and warns that it does not adequately identify risk in stateful systems, where even a shared cache can distort the measurements.[5] The shadow path must also not send messages, trigger payments or write to persistent stores the business relies on.
A canary asks whether a change is safe to roll out further. The same workbook defines it as a partial, time-limited deployment together with its evaluation, and calls it effectively an A/B testing process.[5] Mechanically that is fair: a small real cohort gets the new version and is compared with everyone else. The purpose is operational, catching defects before everyone is exposed to them.
A product A/B experiment asks which version leads to better outcomes for users or the business. It may use the same kind of traffic split, but it informs a product decision rather than a release decision, and it usually needs its own design and duration.
In the calculation example, parity is the wrong target. The new module exists because the rules changed, so some results should differ. Before comparing anything, the business needs to say which differences are expected and approved and which indicate a bug, or the shadow run produces mismatches nobody can classify.
Whatever the technique, measure per cohort. An aggregate error rate can hide a small canary that is failing badly, because its errors are diluted by the healthy majority.[5] Track errors, latency and the business correctness of results for each cohort, and agree in advance on the stop criteria and on who has the authority to stop.
Rollback is easy until data changes
Rolling back application code is usually manageable. Data is harder. A common suggestion is to synchronise a copy of the old database just before cutover and keep it as the fallback. The copy goes stale as soon as the new system starts accepting writes, so switching back can lose them unless the plan accounts for them: replaying or translating them into the old model, reconciling afterwards, or accepting a defined loss the business has explicitly agreed to. Which of these is possible depends on the system.
For schema changes, expand, migrate, contract is a good starting point. You add the new structure beside the old, move every reader and writer across, and only then remove the old one; most database refactorings follow this pattern.[4] A backward-compatible schema during the migrate phase reduces rollback risk considerably. It does not by itself guarantee that old code can interpret everything the new code writes, and it cannot reverse effects that have already left the system.
A migration between systems therefore needs answers before go-live. Who owns writes to each piece of data at each stage, and is there ever a moment when both systems write the same thing? During coexistence, can each side read what the other writes? Which steps cannot be undone, such as dropped columns, lossy transformations or messages already sent to external parties? How much data loss and recovery time can the business accept?
Past a certain point, going back may stop being realistic, and the plan becomes forward recovery: fixing the problem in the new system with a prepared procedure. That is acceptable if it is decided in advance. Whichever path applies, fallback or forward recovery, it should be rehearsed against realistic data volumes. Zero data loss and instant rollback are not something to promise in general.
Knowing when modernization is finished
Without a defined finish line, modernization can absorb budget indefinitely. It is done when the outcomes agreed at the baseline have been reached within the agreed risk, live users and data run on the new system, and the relevant legacy is actually gone: old dependencies, licences, scheduled jobs and the temporary adapters built for the transition. Retirement is the step most easily left undone, which is why it belongs in the definition. Knowledge should also be spread across the team, with releases routine enough that one person’s absence doesn’t stop them.
Some things don’t count. The number of services says nothing about whether the business is better off. A clean security scan shows that the scanner found nothing today, which is different from the system having no vulnerabilities.
Finishing modernization doesn’t end the obligations. Dependencies need updating, new vulnerabilities get published, platforms reach end of support and the business keeps asking for changes. That work belongs in its own ongoing budget, separate from the modernization, so that the system stays supported and reasonably cheap to change.
I discussed several of these questions with Sebastian Dąbkowski in a recorded conversation (in Polish).
Sources
- [1] https://martinfowler.com/bliki/StranglerFigApplication.html — Martin Fowler — Strangler Fig
- [2] https://martinfowler.com/articles/patterns-legacy-displacement — Ian Cartwright, Rob Horn and James Lewis — Patterns of Legacy Displacement
- [3] https://martinfowler.com/bliki/BranchByAbstraction.html — Martin Fowler — Branch By Abstraction
- [4] https://martinfowler.com/bliki/ParallelChange.html — Danilo Sato — Parallel Change
- [5] https://sre.google/workbook/canarying-releases — Google SRE Workbook — Canarying Releases