A Reliability Engineer Says Failover Only Works if You Use It Often. A One-Person Business Has the Same Problem With Its Backups. Here Is the Monthly Drill I'd Run.
Benjamin Cane published a short post on November 25 called "If you want failover to work well, use it often," and it was on the Hacker News front page on Monday. His argument is that a standby environment you never route traffic through will fail you on the day you need it, and that the cure is to use failover during ordinary deploys until it is boring.
He is writing for teams that run two or three environments. I run nothing like that, and I'd guess you don't either. But the thing he describes, a spare that looks healthy and has quietly gone stale, is a precise description of every backup I have ever set up and then not looked at.
Why a standby rots
Cane lists the ways an idle environment decays while its dashboard stays green. Database connections go stale when nothing sets idle timeouts or maximum lifetimes. Firewall rules change around it. Credentials expire. And the health check that reports "ready" often doesn't exercise the same dependencies, network paths and credentials that real traffic would.
Every item on that list has a solo-sized twin. The backup job's storage key was rotated in March and the job has been failing into a log nobody reads. The restore script was written for Postgres 16 and the server is on 19. The DNS provider's API token that the recovery steps depend on belonged to an account you closed. The second server was provisioned from a setup script that no longer matches production.
None of these show up until you try. Cane's line for this is "Finding out your failover has flaws during an emergency is the worst time," and he repeats the old saying that backups are only as good as the last time you restored them.
His fix, and his own caveat
The recommendation is to use failover as part of normal change. Move traffic away from one environment, deploy and validate there, move traffic back. Do it on every release and two things happen: the process becomes familiar, and you gain a reason to automate it.
Frequent failover also forces questions he thinks teams avoid. How consistent is the data on the other side, given replication delay? What happens to requests in flight, and do clients retry? How long does the switch take?
He adds two cautions I appreciated. Active-active setups are "not a silver bullet," because the surviving environment can be overloaded by the traffic it inherits. And a planned shift doesn't prove an unplanned one works. Detection and automatic recovery need their own tests.
What this looks like with one server
Most solo products have no second environment to fail over to, and I'm not suggesting you build one. What you have is a recovery path: the steps that turn a backup and a blank machine into a running product. That path is your failover, and it gets used approximately never.
So the translation of "use it often" is to walk the recovery path on a schedule, on purpose, while nothing is wrong.
Here is the drill I'd run on the first Monday of each month. It takes about thirty minutes once it's scripted.
Restore last night's database backup into a scratch instance. A throwaway container is enough.
docker run -d --name restore-test -e POSTGRES_PASSWORD=test -p 5433:5432 postgres:19 pg_restore --no-owner -h localhost -p 5433 -U postgres -d postgres latest.dump psql -h localhost -p 5433 -U postgres -c "select max(created_at) from orders;"
The last line is the one that matters. A restore that exits cleanly proves the file is readable. A query for the newest row in your busiest table proves the backup is recent and contains what you think it does. If the newest order is from three weeks ago, you just learned something that would have cost you three weeks of data.
Then start the app against the restored database, on your laptop or a cheap temporary box, and load one page that reads real data. This catches the missing environment variable and the secret that only exists on the production machine.
Then time the whole thing and write the number down with the date. That number is your real recovery time. Expect it to be longer than the figure you'd have said out loud, mostly because of steps you have to remember.
Deploy through the spare path
Cane's sharper idea is tying the exercise to deploys so it happens without willpower. A solo version exists if you squint.
If you deploy with containers, bring the new version up beside the old one, point the proxy at it, and keep the old one for an hour. That is a small traffic shift on every release, and it exercises the same move you'd make in a bad deploy. If you have a staging box, rebuild it from your setup script and last night's backup once a month in place of patching it by hand, so the script and the backup both get used.
And when you do infrastructure work anyway (a Postgres major upgrade, a move to a bigger VPS), do it by standing up the new machine from backup and switching over. You had to do the work regardless, and now it doubles as a full recovery rehearsal.
Where this could be wrong
For a product with a dozen users, a monthly drill may be more ceremony than the risk deserves. A quarterly one might be honest enough, and I wouldn't argue with someone who chose that.
A restore drill also tests less than a real failure does. It doesn't test whether you'd notice the outage at 3 a.m., or whether you can reach your accounts from a borrowed laptop. Cane makes the same point about planned failover, and it applies here with more force.
Managed databases change the picture too. If your provider does point-in-time recovery, the mechanics are theirs. I'd still restore to a new instance once and connect the app to it, because the part that breaks is usually on my side.
What I'd actually do
Put a recurring thirty-minute block on the first Monday of the month. The first time, expect it to take two hours and to find at least one broken thing. Script what you did. After three rounds the drill is one command and a number in a notes file, and you will know the backup worked last month because you watched it work.
Author
Lukas
@lukcombinator