Running a migration programme
A migration programme is a tracker, a set of cohorts and a decision about the tail. The tracker counts what has stopped using the old thing, the cohorts say who does the work, and the decision about the last ten per cent is made before the deadline, not after it
A month before a deadline, 2,100 of 2,400 accounts have moved: 87.5%. Moves per week have fallen from 220 to 60 over the month. What do you do first?
Cross-team projects and migrations teaches how to run a migration from the technical lead’s seat: derisk, enable, finish, and the patterns for moving code and data. This chapter is the other seat. You are the technical program manager, you may not write the codemod, and you own the plan that gets four hundred or four thousand callers to the end. It covers the tracker, the cohorts, the date, the tail and the way you report all four. Where the staff chapter has a technique, this one points at it.
Public APIs make the problem sharper, because you cannot open a customer’s repository. The mechanics of deprecating one, telemetry by client, headers and brownouts, are in platform and technical PM. Here the running example is a send endpoint at Wrenpost, the messaging API, with Routing, its eight-person carrier-integrations team, holding the oldest code.
What a migration programme adds
A migration has a property most programmes do not: it ends in a deletion. The outcome is not that the new thing exists but that the old one does not. Write that into the charter as the done-means check, for example ‘the v1 endpoint, its routing table and its on-call runbook are removed, and its contract with the aggregator is cancelled’. A programme that stops at ‘v2 live’ has stopped at the cheapest part.
Migrations also invert the usual cost. The benefit lands on one team, here Routing, and the cost lands on thousands of callers who did not ask for it. Every caller has a rational reason to go last. Your job is to make moving cheap, make the remaining callers visible, and make the end a decision someone has taken in advance.
The programme has four parts. The tracker says where you are. The cohorts say who does the work. The date says when pressure begins and why. The tail decision says what happens to whatever is left. The rest of this chapter takes them in order.
The tracker is the programme
A migration tracker is the one document that every update, every meeting and every escalation comes from. It has five rules.
Count what you can see, in units that mean something. Count accounts, not API keys, because an account with three keys has moved only when all three have. Count from traffic: an account has moved when it has made no calls to the old endpoint for 14 days, including a month end, because the monthly job someone wrote in 2022 is the call you will otherwise discover on switch-off day. The 14 days is a rule of thumb; choose a window longer than your customers’ longest regular cycle. A caller who tells you they have moved is a lead to check, not a finished row.
Track traffic as well as accounts. Accounts alone hide that the 20 largest hold most of the messages. Traffic alone hides that 160 tiny accounts need 160 conversations. Show both, because they answer different questions: accounts say how much outreach remains, and traffic says how much risk remains.
Start with the inventory, built from logs. Before announcing anything, list every account that called the old endpoint in the last 90 days, with its API keys, its SDK and version (taken from the user-agent header where it exists), its volume, its last call and a contact. This takes a week and always turns up surprises, such as accounts with no contact, or two companies sharing one key.
Give every row an owner and a next step. A tracker with a row labelled ‘in progress’ is a tracker with no one doing anything. Each cohort has a named owner at Wrenpost, and each outside dependency, such as a plug-in vendor, has a named contact.
Refresh it from telemetry, weekly, on the same day. A hand-edited tracker drifts. If your logs can feed it, let them. Publish it where the account managers, support and Routing can see it. Nobody wants to be the last bar on the chart, and the visibility does more than another reminder email does.
Cohorts: sort by how they move, not by size
The tempting split is by size: big, medium, small. Size matters for risk, but it does not tell you what work moves an account. Sort by the work.
| Cohort | How it moves | Who does the work | What goes wrong |
|---|---|---|---|
| The largest accounts | A named engineer from your side pairs with theirs | Wrenpost’s account team and Routing | They have freeze periods and change boards, and the date lands in one |
| Official SDK users | They upgrade the SDK, whose new major version calls v2 | The customer, through a version bump you make easy | Pinned versions that nobody has touched in two years |
| Hand-written HTTP callers | They change their own code: new fields, new response handling | The customer, with a guide and a test sandbox | The longest middle, and the source of the tail |
| Third-party plug-ins | The plug-in’s vendor ships a new version, and each customer installs it | An outside company that is not your customer | Four vendors hold hundreds of accounts, and one is unreachable |
| Sleeping accounts | No work: contact them and retire the key | Support | Nobody replies, so you need a policy for silence |
Two things make this useful. First, each row has a different lever, and a different lever means a different message, a different owner and a different date. A reminder email works on the SDK cohort and does nothing for a plug-in. Second, it shows you where one conversation moves many accounts. Four plug-in vendors holding 420 accounts is a four-conversation problem, not a 420-conversation problem, and it is a dependency like any other: a task owned by someone outside your programme, on a path to your date.
Lead with the hard cohorts. Start with the callers most likely to find a flaw in the new endpoint, not the ones most likely to move quickly, for the reason given in the staff chapter: easy successes tell you about the new design only what you already believed.
The first change, and the date
Before any account moves, stop new use. New API keys can call only the new endpoint. The quickstart, the examples and the SDK default all point at it. Without this the inventory grows while you burn it down, and every week’s progress is partly cancelled by new arrivals.
Then set the date, and ask a hard question about it: who loses if it moves? A date has force when someone outside the programme loses. A carrier ends a route, a licence expires, a regulator’s deadline arrives. ‘Routing goes to the Kenya connection, due 1 March 2027, and wants v1 gone before then’ is a reason, but it is Routing’s reason, not the customers’. That does not make the date wrong. It tells you its character: it can bend for named accounts with a named end, and it should not bend for everyone, because a date that moves for everyone teaches the next 2,400 customers that dates are soft.
Build a ladder up to the date and tell customers every rung.
- Announcement, with the date, the reason and a migration guide, and a
Sunsetheader on responses from the old endpoint so that the date reaches the people who read headers and logs, not only those who read email. - Outreach by cohort, from the person who owns that cohort, with each message saying what the customer must change.
- Brownouts. Short, announced periods when the old endpoint returns errors: for example one hour in week 21 and four hours in week 24. They find the callers nobody remembered while there is still time to help them.
- The switch-off, treated as a cutover with a runbook, an abort and a named person who decides, in the style of a production readiness review. Launch readiness and cutover is covered in its own chapter of this track.
Each brownout is also data. The accounts that call during one are, by definition, not yet moved, and a few of them were not in your inventory.
The last ten per cent
By week 26 the tail at Wrenpost is 240 accounts. They are not 240 of the same thing. Sort them by cause:
- Could not move: the plug-in with no maintainer, the system a customer’s contractor built and left. The work is not theirs to do quickly.
- Will not move: the account that has decided v2 is not worth the work. The reason is usually cost, and sometimes it is a missing feature, which is a finding about v2.
- Cannot be reached: the contact left, the email bounces. Often these are the sleeping accounts.
- Must not break: the senders of login codes and similar. A failed send here is a customer locked out of their own users’ accounts. These get a named owner and individual attention.
Each cause has a different answer, and the programme’s job is to give each one. For the cannot-be-reached, a final warning by every channel and then retiring the key is defensible; for the must-not-break, a one-to-one plan; for the could-not-move, either the vendor is pressed to ship or Wrenpost does the work; for the will-not-move, a conversation about what would change their mind.
At the date you have four general options, and each is right somewhere.
| Option | Right when | Costs |
|---|---|---|
| Force: switch off for everyone | An outside party sets the date, or the old system is unsafe | Customers who break, and the support load that follows |
| Leave them: keep the old path, frozen | The tail is small in traffic, the old code is cheap while frozen, and Routing has other commitments | Two systems stay alive, and the end date goes soft if nobody owns the review |
| Charge to stay | The old path costs real money per account and the terms allow a price change on notice | It turns the old path into a product you have to support |
| Do it for them: translate old calls to new | The tail is large, unreachable and mechanical to translate | A new layer to build and maintain, and edge cases the old path had |
The staff chapter’s advice is to dig into the nooks yourself, and for internal callers it is right. For an external API it is more limited, because you cannot change their code. Your equivalent is the layer that translates, if it is cheap, or a named plan for each account if it is not. Set the shim against the cost of waiting. At one engineer-day a week, six engineer-weeks (30 engineer-days) takes 30 weeks to pay back, before any upkeep, so a shim earns its place only if v1 would otherwise live longer than that. What you must not do is let the choice arrive on the day. Decide it three weeks before, write it in the tracker, tell the sponsor the cost of each option, and make the decision at the date a check against the plan, not a debate.
If you choose to leave accounts on the old path, it is a decision with conditions, not an omission. It is frozen: no features and no non-critical fixes. Each account has an owner and a reason. A review date is in the calendar with a named person who holds it. Without those three, ‘leave them’ is the 70% migration the staff chapter warns about, arrived at by default.
Reporting a migration
A migration’s status line is short and has no room to hide. ‘Moved’ is a number with a definition, ‘remaining’ is split by cohort, and the trend is the last four weeks of moves. Report the pace and say what it implies, not only the figure: ‘moves have fallen from 52 to 29 a week; at this rate about 820 remain at the date.’ Pair that with what you are doing about it. Do not report a percentage as the headline, because it flatters the middle of the programme and hides the end.
When the number and the date disagree, say so early, with options priced against the charter, in the way set out in managing across teams and upward. Status, escalation and bad news has its own chapter in this track.
Where practitioners disagree
Hard date or soft date? Some programme managers argue that the only date that works is one that cannot move, and a switch-off that is postponed once is postponed always. Others observe that a hard date with no tail plan breaks customers. The test is in the reason for the date. If it is external, hold it. If it is yours, hold it for the many and bend it, visibly, for the few.
Count accounts or traffic? Teams that care about risk watch traffic; teams that care about workload watch accounts. Watch both, and decide which one the sponsor sees first. A sponsor who sees 98% of traffic moved may not notice that 240 conversations remain.
Who finishes? Some say the migrating team owns the tail to the end. Others say the programme should end when the supported path is complete and a smaller sustaining team takes the rest. Both are workable if the choice is made, with a named owner, before the funding conversation, and not at the moment the original team is reassigned.
Day to day
- Before announcing, one to two weeks. Build the inventory from logs. Sort it into cohorts and find the owners. Write the charter’s done-means as a deletion. Ship the stop-new-use change. Agree with Routing and the sponsor what happens at the date, in outline.
- Weekly. Refresh the tracker from telemetry on the same day. Read the pace by cohort. Send the update: moved, remaining by cohort, the pace and what you are doing about it. Chase the owners of any cohort whose row has not moved.
- Weekly, with the cohort owners. A 30-minute call: blocked accounts, vendor responses, next messages. Keep the support lead’s list of questions from customers, because the same five questions are the migration guide’s next edit.
- Fortnightly. Contact the outside dependencies, such as plug-in vendors, and record their answers and dates as assumptions. Review the largest accounts one by one.
- Before each brownout. Announce it a week ahead by every channel. Brief support. After it, list the accounts that called, and add them to the inventory.
- Three weeks before the date. Take the tail decision to the sponsor with the cause-sorted list and the cost of each option.
- On switch-off day. Run the runbook. Keep the person who can abort available and watch the error rates by cohort. Announce the result.
- After. Record what remains and who owns it. If the old path stays, fix the review date. If it is gone, delete it, cancel the contracts and write the one-page retrospective.
There is rarely a TPM, and the migration is one engineer moving a few hundred customers from an old API to a new one. The list of callers fits in a spreadsheet and the largest ten are people the founder knows. Message them directly, set a date you can keep, and check the logs the day after. The risk is not method but attention: the work stops at 70% when a customer fire starts. Pick a migration you can finish and fund it to the deletion.
This is where migrations stop being one person’s job. There are thousands of callers, an account team and a support team, and a platform team that wants to delete old code. Nobody owns the tracker, so you do. Expect to build the telemetry, write the cohorts and be the person who holds the review date after the migrating team moves on. Keep one sponsor and use them for the two or three real conflicts.
Migrations come with external dates, such as a licence, an end-of-support or a regulator’s deadline, and with contracts that promise customers notice and compatibility. A change board, a legal review and a customer advisory group all have views on the date. The tail is measured in quarters and includes customers with their own change freezes. Your work is the schedule of notices, the exception process and the evidence the next migration will be judged on.
Template
# Migration tracker: <old> to <new> · week <n> · <date>
Sponsor: <name> · TPM: <name> · Migrating team: <team>
## End state
<What is deleted or switched off, and what is cancelled.>
## Definition of moved
No calls to <old> from any key on the account for <n> days, including a month end. Source: <logs>.
## Stop new use
<What changed, when, and how it is checked.>
## Cohorts
| Cohort | Accounts | Moved | Remaining | Share of traffic left | Lever | Owner | Date |
|---|---|---|---|---|---|---|---|
| | | | | | | | |
Total: <accounts> = <sum>. Moved <n> (<%>).
## Outside dependencies
| Who | What they must ship | Contact | Promised date | Accounts it moves |
|---|---|---|---|---|
## The date
Switch-off: <date>. Why it is fixed, and who loses if it moves: <reason>.
Ladder: announcement <date> · brownouts <dates, lengths> · switch-off <date>.
## Pace
Moves per week, last four weeks: <a, b, c, d>. At this pace, remaining at the date: <n>.
## The tail
| Cause | Accounts | Answer | Owner |
|---|---|---|---|
| Could not move | | | |
| Will not move | | | |
| Cannot be reached | | | |
| Must not break | | | |
Decision on the tail, to be taken by <date> by <name>. Options and costs: <...>
## Log
| Date | Change | Approved by | Why |
|---|---|---|---| WORKED EXAMPLE
Wrenpost is a fictional messaging API with about 55 engineers in seven teams and about 2,400 business customers; all figures here are illustrative. Barakat is the TPM. Routing (eight engineers) built the v2 send endpoint and owns the old v1 code. Both report delivery by webhook. v1 takes the number as a plain string in to, pages lists by offset and returns errors in its own format; v2 takes a recipient object in place of to, pages by cursor only and returns problem details. Laleh, a support lead in Lagos, owns the sleeping and unreachable accounts.
End state. v1, its routing table and its runbook are removed and its contract with the aggregator is cancelled. Moved: no calls from any key for 14 days, including a month end. Stop new use: since week 0, new keys return a 403 on v1, and the quickstart and SDK default to v2.
Cohorts in week 20:
| Cohort | Accounts | Moved | Remaining | v1 traffic left | Lever and owner | Date |
|---|---|---|---|---|---|---|
| Largest 20 | 20 | 17 | 3 | 5% | Paired engineer, Routing | Week 22 |
| Official SDK | 700 | 560 | 140 | 4% | Version bump; account team | Week 24 |
| Hand-written HTTP | 1,100 | 640 | 460 | 6% | Guide and sandbox; Barakat | Week 24 |
| Third-party plug-ins | 420 | 150 | 270 | 2% | Four vendors; Barakat | Week 23 |
| Sleeping | 160 | 35 | 125 | under 1% | Retire the key; Laleh | Week 25 |
| Total | 2,400 | 1,402 (58%) | 998 | about 17% |
Sources: accounts and traffic from the v1 request log, run each Thursday (week 20: the 14-day window ending Wednesday). Traffic left is the share of v1’s original message volume still sent by the remaining accounts. The four plug-in vendors each have a named contact in the dependency table, not shown here.
Pace. Moves in the last four weeks: 52, 41, 38, 29. At about 30 a week, six weeks moves 180, leaving about 820 at week 26 against a plan of near zero. The gap is in two cohorts. Two of the four plug-in products have not shipped a v2 version; they cover 270 accounts, so two vendor conversations are worth more than 270 emails. The hand-written cohort trips on the recipient object and the error format, so the guide gets a ten-line wrapper and a table of error mappings.
The date. Switch-off in week 26 because Routing moves to the Kenya connection, due 1 March 2027, and nobody outside Routing loses if it slips. So the date holds for the many and bends, visibly, for named accounts. Brownouts: one hour in week 21, four hours in week 24. Tail decision by week 23, by the sponsor. Draft tail answers: cannot reach, final warning on every channel and then retire the key; must not break (38 login-code senders), a one-to-one plan each; could not move, press the vendor or build the translation; will not move, a conversation about what would change their mind.
Log. Week 12: the ‘moved’ window lengthened from 7 to 14 days after a monthly job on three accounts called v1 and had been counted as moved; the three were reopened. Approved by the sponsor.
Now you
You are Barakat, the TPM, in week 20 of Wrenpost’s v1 retirement. The date is week 26. The inventory has 2,400 accounts and the tracker has 1,402 moved. Moves in the last four weeks were 52, 41, 38 and 29. Of the 998 remaining, 460 are hand-written HTTP callers, 270 are on two plug-in products whose vendors have not shipped a v2 version, 140 use an old SDK version, 125 are sleeping accounts and three are among the largest 20. Laleh reports that 38 of the 998 send login codes. A brownout in week 21 is already announced for one hour. Routing is committed to the Kenya connection, due 1 March 2027. Produce the tracker: cohorts with levers and owners, the pace and what it implies, the two dependencies you would raise first, and when the tail decision is made.
Self-check
You are Barakat, the TPM, in week 26 of Wrenpost's v1 retirement. The date has arrived. Vendor releases and the brownouts have cut the 998 remaining in week 20 to 240 of 2,400 accounts: 15 on old SDK versions, 105 hand-written callers, 95 on two plug-in products and 25 sleeping. Together they send about 2.5% of Wrenpost's messages, and 38 of them send login codes. Routing, eight engineers, is committed to the Kenya connection, due 1 March 2027. Keeping v1 as it is costs about one engineer-day a week. A translation layer would take about six engineer-weeks, plus upkeep. A fee needs 60 days' notice under the terms. What do you do?
- POST Migrations: the sole scalable fix to tech debt Will Larson, 2018
The derisk, enable and finish model for a migration, including the warning about leaving one partly done. Read it for the stages, then use this chapter's tracker and cohorts to run the finish.
- BOOK Software Engineering at Google, chapter 22: Large-Scale Changes Hyrum Wright, Titus Winters and Tom Manshreck, 2020
How a very large company makes the central team write the change and the owners review it. Useful for your internal callers, and for thinking about what a translation layer would take on. Read: O'Reilly; the free online edition is on the Abseil site.
- POST APIs as infrastructure: future-proofing Stripe with versioning Brandur Leach, 2017
A public API company's account of the trade between a better developer experience and the burden of keeping old versions alive. It is the other side of the choice between forcing, leaving and translating.
- POST Why Doesn't Stripe Automatically Upgrade API Versions? Brandur Leach
A follow-up on why Stripe does not upgrade accounts automatically: it cannot tell whether an upgrade is safe for a given account. Read it before forcing an upgrade on accounts you cannot test.
- DOC RFC 8594: The Sunset HTTP Header Field Erik Wilde, 2019
The standard header for telling clients when a resource is likely to stop responding. It reaches the people who read logs and headers, which email does not.
All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.