Since December 1, 2026, high availability and read replicas are no longer limited to PostgreSQL: MySQL, MariaDB and Valkey have them too. A database with high availability has a standby, a copy kept up to date continuously on separate hardware, that takes its place by itself if it goes down.
Before announcing it, we tried it in production on our own account: one database per engine, witness data, then outages we caused and planned failovers. The times below come from the logs of the console and of the machines, in Montréal time. The test also brought out two defects, fixed the same day before the outages; section 2 tells how. How managed databases work in general is described in Managed databases in Montréal, a walkthrough.
1. The setup
Three databases of the smallest size (1 GB, 0.020 CAD an hour), in the same private network: MySQL 8.4 (Percona Server), MariaDB 11.8 and Valkey 8.1. In each, a table of 1,000 witness rows (Valkey: 1,000 keys), then high availability. For a customer, it takes one call:
curl -s -X PUT https://api.ffxf.net/v1/databases/52/high-availability \
-H "Authorization: Bearer $FFXF_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
or at order time, with "high_availability": true in
POST /v1/databases. The standby starts from the latest backup of the
database (Valkey: from a transfer over the network), catches up with what was
written since, then follows every change. It sits on other hardware than the
database, serves no queries, and does not show up as a database of its own in the
console. The database's availability does: preparing, then
ready.
2. What the test fixed before the outages
The setup brought out two defects, before any outage: an install that could stop halfway on a new machine, and a MySQL standby that would not start. Both were fixed and deployed the same day; the measurements in the next sections were taken afterwards.
3. Outage 1: the Valkey database machine stops dead
The standby had been following the database, with no lag, since 13:19:53. Right before the outage, 500 more keys: 1,500 on the database, 1,500 on the standby. At 13:21:04, the database machine is stopped at once, with no clean shutdown, like a power cut:
| Time | What happens |
|---|---|
| 13:21:04 | The database machine stops. The standby declares it lost after 10 seconds without news. |
| 13:21:44 | The console fails over: the database has been silent for 30 seconds, its standby lost it 20 seconds ago. |
| 13:21:53 | The standby is promoted: it accepts writes. |
On the new machine: the 1,500 keys, a write accepted, and the database's private name pointing at it. Backups resumed right away, and a new standby was ordered by itself, on other hardware. The former machine was destroyed.
4. Outages 2 and 3: MySQL and MariaDB
The same for the other two databases, after 500 more rows in each:
| Engine | Machine stopped | Failover | Gap | Rows after |
|---|---|---|---|---|
| Valkey 8.1 | 13:21:04 | 13:21:44 | 40 s | 1,500 of 1,500 |
| MySQL 8.4 | 13:30:45 | 13:31:22 | 37 s | 1,500 of 1,500 |
| MariaDB 11.8 | 13:34:32 | 13:35:03 | 31 s | 1,500 of 1,500 |
In all three cases, the standby became the database about ten seconds after the failover, with every witness row, and a write was accepted at once. For PostgreSQL, the same outage took 39 seconds on November 30. Replication stays asynchronous: a write committed in the very last moments before the outage could be missing. Our witness rows were written a few seconds before; none was missing.
5. After the failover: backups and a new standby
With MySQL and MariaDB, the promoted machine resumes backups with a full one: started 12 seconds after its promotion, done in 4 seconds for the test's MySQL database.
The new standby starts from that backup, not an older one. For the MySQL database, it caught up with the writes that followed, then followed the database directly; it was streaming at 13:41:02, ten minutes after the outage, machine creation included. A restore to the minute is still possible on both sides of the failover; between the failover and the end of that first backup (a few seconds here), it gives the database as it was at the failover.
6. Maintenance: a failover with no loss
Weekly updates of a database with high availability are applied to the standby first, which then takes the place of the database. This time nothing breaks: the database stops cleanly, once it has sent everything to the standby. MySQL and MariaDB first turn read-only until the standby has received the last binlog. We triggered this failover by hand on each database, right after writing 500 more rows (or keys):
| Engine | Failover time | Rows or keys after | Lost |
|---|---|---|---|
| Valkey | 5 s | 2,001 of 2,001 | 0 |
| MySQL | 15 s | 2,001 of 2,001 | 0 |
| MariaDB | 6 s | 2,001 of 2,001 | 0 |
The time runs from the failover request to the standby taking over. The database accepts writes again about ten seconds later, once the standby is promoted.
7. Why 30 to 40 seconds
Failing over too fast would be worse than failing over late: a database that is alive but briefly unreachable would end up duplicated. So the console requires two signs at once: the database has not answered for 30 seconds, and its standby lost it 20 seconds ago. A standby that still receives the database proves it is alive, even if the console no longer sees it.
The other guard is on the database itself. If it loses both the console and its standby for 20 seconds, it turns read-only and closes its sessions before the standby can take its place. A database cut off from the network but still running therefore stops taking writes before another one starts.
8. What high availability costs
The standby is billed like the database, at the same period. It does not count in the database quota.
| 1 GB database | By the hour | By the month |
|---|---|---|
| Alone | 0.020 CAD | 14.60 CAD |
| With its standby | 0.040 CAD | 29.20 CAD |
The three test databases, their successive standbys and the replaced machines cost less than a dollar for the afternoon. Everything was deleted afterwards.
9. Takeaways
- MySQL, MariaDB and Valkey now have high availability and read replicas, like PostgreSQL, through the console, the API or the MCP server.
- Database machine stopped dead: failover in 31 to 40 seconds, then writes accepted about ten seconds later. No witness row lost.
- Updates: a planned failover of 5 to 15 seconds, with no write lost.
- After a MySQL or MariaDB failover, the new machine takes a full backup right away, and the new standby starts from it.
- On the application side: go through the database's host name, never its address, and plan for reconnecting.
The details are in the databases documentation, and high availability for a website, on the machine side, in High availability: load balancer, two VMs, an outage.