The short answer
You don't switch everything on one weekend. You move one part at a time, while the rest of the old system keeps working.
Each new part runs beside the old one until the two agree. Then you switch it over, keeping a way back.
What a single big switch can cost
In April 2018, the UK bank TSB moved its customer records onto a new platform over one weekend. The data arrived intact, but the platform failed at once.
Branch, phone, online and mobile banking were disrupted for a large share of its 5.2 million customers. Normal service took until December 2018.
In December 2022, the UK's two financial regulators fined TSB £48.65 million between them. They found it hadn't organised and controlled the programme properly.
Most migrations are far smaller. The lesson scales down: one large switch puts every risk on one day.
1. Map it, then pin it down
Start with a written map. It should say what each part does, what it connects to, and where the data lives.
Then write tests that record what the system does today. Include its odd behaviour, since users may depend on it.
These tests become the yardstick. A new part is ready when it passes the same tests as the old one.
2. Put a switch in front
Place a routing layer between users and the old system. At first it sends every request to the old system, so nothing changes for anyone.
Later, it sends some requests to new parts. Users keep the same screens and addresses throughout.
Martin Fowler calls this way of replacing a system a strangler fig. Microsoft's architecture guide calls the routing layer a façade.
3. Move the least risky part first
Choose a part that's small, fairly separate and useful to users. A report, a search page or an export is often a good start.
The first part tests the whole method. It shows how data stays in step and how the switch behaves, while little is at stake.
4. Run both and compare
Send the same work to the old part and the new one. Users still get the old result, and any difference is logged.
GitHub did this in 2015 when it replaced the code behind its pull request merge button. It ran both versions on a share of requests, starting at 1%.
Users saw only the old result. When the new code ran on every request for 24 hours with no differences, the team switched.
The comparison also found two long-hidden bugs in the old code. That's common, and each difference needs a decision: fix the new part, or accept the change.
5. Rehearse every data move on a copy
Data needs the most care. Move it first on a copy, and check row counts and totals against the original.
While both systems run, keep the data in step between them. Microsoft's guidance notes you can roll back easily until the old tables are removed.
So remove old data last, after the new part has proved itself.
6. Switch a few users first
Send a small group to the new part before everyone. Your own staff are a good first group.
This is called a canary release. If something goes wrong, you route that group back to the old part while you fix it.
7. Keep a way back, then switch off
Test the way back before each switch, so you know it works. Keep the old part ready until the new one has run quietly for a while.
Then archive the old part and switch it off. Delete nothing until you've signed off in writing.
Finish the job. Old parts left running "just in case" cost money and keep two systems alive.
Your checklist
- A written map of what the system does and connects to
- Tests that record today's behaviour
- A routing layer that can send each request to old or new
- A first part chosen for low risk
- Old and new compared on the same work, with differences decided
- Each data move rehearsed on a copy, with counts and totals checked
- A way back, tested before each switch
- A date to archive and switch off each old part
