AnjaneyaX Consulting Services
Connect With Us
Back to Blog
BlogArchitecture

Legacy Modernization Without a Big-Bang Rewrite

Rewrites fail because the old system keeps changing while the new one is built. The strangler approach, how to pick the first slice, and how to keep the business running throughout.

AnjaneyaX Engineering
Editorial team
June 4, 2026
7 min read
Architecture

The most expensive sentence in software is "let's rewrite it". Rewrites take twice as long as planned, the old system keeps gaining features while the new one catches up, and the day of the switch is terrifying. There is a better way, and it is not new: replace the system one piece at a time while it keeps running.

Why rewrites fail

A legacy system encodes years of business rules nobody wrote down. A rewrite has to rediscover all of them, usually by shipping without one and hearing about it from a customer. Meanwhile the business cannot wait, so the old system keeps changing and the target moves. By the time the new system is "done", it is behind. The strangler approach avoids this by never having a day when everything switches.

Put a front door in front of the old system

The first step is a routing layer (an API gateway, a reverse proxy, or a thin facade service) that all traffic goes through and that initially just forwards everything to the legacy system. Nothing changes for users. Now you have a place to redirect one route at a time to new code.

Pick the first slice carefully

The best first slice is small, well understood, frequently changed and annoying. A reporting module, a notification service, a single workflow with its own data. It should take weeks, not months, and it should be something the team is itching to fix. Success here builds the confidence and the patterns for everything after. Do not start with authentication or the core data model; those come last, once everything around them has moved.

Deal with the data honestly

Shared databases are the hard part. Three approaches, in increasing ambition: the new service reads and writes the old tables through a clean internal API; the new service owns a copy that is synchronised from the old system during transition; or the new service owns the data and the old system reads it through the facade. Pick the simplest one that works for each slice, and expect to use all three across a migration.

Run both and compare

For critical paths, send requests to both old and new code, return the old result to the user, and log any differences. This shadow mode finds the undocumented business rules before customers do. When the diff log is quiet for a week, flip the route. Keep the old path available for a fast rollback.

Measure as you go

Track the share of traffic served by new code, the number of legacy modules remaining, and incident counts. Report it monthly. A modernization that shows steady movement keeps its budget; one that is "80 percent done" for a year does not.

Know when to stop

Not everything needs to move. A stable module that changes once a year can stay on the old platform behind the facade indefinitely. The goal is a system you can change safely, not a system with zero old code.

Takeaway

Front door first, small annoying slice next, shadow traffic before every switch, data strategy per slice, monthly measurement. It is less dramatic than a rewrite and it is how modernization projects actually finish. The business keeps running the whole time, which is the point.

© 2026 AnjaneyaX Consulting Services. All rights reserved.