Design for Seamless Migration Experience

Confidential — Public Healthcare · Collaboration Platform

Snapshot
Duration
A cutover measured in minutes, behind several weeks of preparation
Scope
One collaboration platform, its schema, and the five environments in the path
Role
Migration design and cutover — replication, routing and the return path
Roles involved
DBA, platform engineer, application support, infrastructure and security
Deliverables
Replication topology, single-endpoint routing, benchmark record, rehearsed cutover and rollback
NDA
Client name withheld. The platform is described at a structural level; configuration, data and commercial terms are not reproduced.
5.7 → 8.0
One major version apart, and everything that changed inside it
0
Downtime at the cutover
1
Endpoint in front of primary and replica, writes and reads split beneath it
2
Replication tools benchmarked before one was chosen

Problem

The platform runs the organisation's day-to-day collaboration: teams, documents, approvals, and the small transactions that hold a working week together. Staff reach it from a browser at any hour, and they notice when it is not there. MySQL 5.7 was out of support, so the upgrade was not a choice.

8.0 is not a drop-in replacement for 5.7. Between the two versions sit changes to authentication, to the optimiser, to reserved words and to defaults — and a schema that has been in service for years has found its way around all of them, mostly by accident. Two requirements were fixed at the start: the service must not go down, and there must be a way back.

The second is the harder one. Rollback is easy to promise and difficult to deliver, because by the time you know you need it you have already written to the new engine. So the design question was not “how do we upgrade” but: what has to be true at T-zero for going back to 5.7 to be a routing decision rather than a restore?

Approach

Four decisions carried it.

Replicate, don't copy. Data moved under continuous replication rather than a dump and reload. The target therefore stayed current with production right up to the change, and the final delta was small enough to close in seconds instead of hours.

Put one endpoint in front, and split reads and writes beneath it. Every client connects to a single address; which engine that address resolves to is configuration, not code. This is what makes the cutover and the rollback the same operation run in opposite directions — and it means no application change was needed to move the traffic.

Choose the router by benchmark, not by reputation. Two candidates were researched and benchmarked against the same workload. The one that ships with the 8.x line and holds high availability and read-write separation behind a single address was selected. The reasoning was written down before the cutover, so it did not have to be re-argued under time pressure.

Rehearse the return path. The rehearsal included the rollback, because a rollback that has never been executed is a hypothesis about a rollback.

Figure 1 — The same topology, pointed in two directions

One topology, pointed in two directionsThe cutover does not change the shape of the system, only which line the traffic followsBEFOREApplicationno changeRouter 8.4one endpointMySQL 5.7live trafficMySQL 8.0replica, caught upCDCOne engine serves. The other follows it.AFTERApplicationno changeRouter 8.4one endpointMySQL 5.7rollback targetMySQL 8.0live trafficCDCThe same shape, with the solid line moved.Cutover and rollback are one operation run in opposite directions, because the only thing that moves is which engine the single endpoint resolves to.

Figure 2 — What had to be true before the window opened

What had to be true before the window openedThe window is minutes. Everything that makes those minutes safe happened before itWHENWHAT HAPPENEDWHAT IT BOUGHTT–6 wksCompatibility sweep: every object, default and reserved word that 8.0 treats differentlyA list, before it became an incidentT–4 wksBaseline benchmark on 5.7 — JMeter for behaviour, Sysbench for throughputA number the new engine has to beatT–2 wksRehearsal of the cutover, including the return pathA rollback that has been executedT–1 wkReplication started and lag tracked to zeroA final delta small enough to close in secondsT–0Writes stopped, replication drained, traffic redirected at the endpointMinutes, not a windowT+1 dayPost-upgrade benchmark and security audit, run against the same baselineEvidence rather than reassuranceT+2 wks5.7 held as the rollback target, then retiredRollback stops being a permanent costThe only step that touches production is five rows down. Everything above it is what makes that step reversible.

How it was run

Compatibility came first. Every object, function and query pattern that 5.7 tolerated and 8.0 does not was found before the window rather than during it — a list of known differences is worth more than a confident assumption, and it is the only artefact that stays useful after the project ends.

The path ran through five environments — development, system integration, user acceptance, pre-production and production — each one a rehearsal of the next, so that the first time the procedure met production it had already been performed four times.

Measurement was set up on both sides of the change. JMeter and Sysbench runs were recorded on 5.7 before the upgrade and repeated on 8.0 afterwards, against the same workload, so that “faster” was a comparison rather than an impression. A security audit ran as part of acceptance, because an upgrade silently changes authentication defaults.

The window itself is short and dull, which is the point: writes stopped, replication drained to zero lag, the endpoint was redirected, a check list was run, and the service was opened. If any check had failed, the redirect went back the other way.

Figure 3 — Five states, two ways back

Five states and two ways backCutover is a state change with a return edge, not a switch that is thrown onceLive5.7 serving8.0 behindReplicatingboth runninglag falling to zeroCutover8.0 serving5.7 currentSoakdisagreementswatched, not assumedRetired5.7 keptfor two weekslag = 0checks passno disagreementheldone redirect, from either state — the same endpoint, resolved the other wayno restore, and no transaction acknowledged by only one engineThe return edge is what makes the forward edge safe to take. A cutover with no tested way back is a bet, not a procedure.

What we delivered

01
Replication topology
Continuous replication from 5.7 to 8.0, with lag tracked as a cutover condition rather than a monitoring detail.
02
Single-endpoint routing
One address in front of primary and replica, with read-write separation beneath it — the mechanism that makes both cutover and rollback a redirect.
03
Compatibility findings
Every construct 5.7 accepted and 8.0 does not, with the resolution for each.
04
Benchmark record
Before and after, on the same workload and the same tooling, so performance is a measurement.
05
Rehearsed cutover and rollback
A procedure that has been executed end to end, including the return.
06
Post-upgrade report
What changed, what was removed, and what the next upgrade should start from.

The platform is described at a structural level. Client name, data and configuration are withheld.

Impact

The support gap closed without a maintenance window, and the post-upgrade benchmarks improved on the pre-upgrade baseline rather than merely surviving it.

The more useful outcome is that the routing layer stayed. Read-write separation behind one endpoint is now the platform's normal shape rather than a migration artefact, which means the next version change starts from a position where traffic can already be moved without touching a client.

And rollback became temporary on purpose. 5.7 was kept as a return target for a defined period, then retired. A return path that is maintained forever is a second system; one that is retired on a date is a procedure.

CONTACT US

We provide a custom made service for just drop us a line.
We would be glad to have feedback from you.