If you want failover to work well, use it often
183 points by madflojo 5 hours ago | 42 comments

trollbridge 4 hours ago
A thousand times, yes. I now do rolling reboots in my clusters, partly because I needed to get a lot better about keeping them patched.

Once you trust your HA, you just take the server or service offline, do what you need to do, and then turn it back on. And you have a backup plan of “it’s trivial to just spin up a new server because we made sure to test that regularly, too”.

Occasionally we do “pull the power cord” (or more realistically tell the ups/peu to turn it off), and then testing that AMT/iLO/iDRAC/whatever functions to turn it back on. If you have things set up properly this can all happen with almost no effort via an agent harness.

The same is true if you’re relying on clustered storage or RAID at all. You’d better periodically just fail over off a drive (and should do this rolling) instead of waiting for a drive to fail.

reply
j45 3 hours ago
It's a good idea to just schedule and proactively replace hard drives too, especially depending on the grade of it.
reply
bonoboTP 3 hours ago
Good idea for infinite money, but if you don't have a huge storage cluster, modern disks don't fail all that much. Super rare for enterprise level ones. I've operated many dozens, I had like one or two fail over 5 years and those were already over 10 years old. I found SSDs more finicky.
reply
dapperdrake 42 minutes ago
What about cycling through? The additional drive can be your "hot spare" or "cold spare".
reply
toast0 2 hours ago
For home stuff, I try to replace hard drives on a schedule, but economics win. For work stuff, my experience was spinning drives offer pre-failure indication if you monitor smart; ssds fail less often, but I never got an indication before failure. Historically, most of my servers would be replaced before you really start to worry about storage lifetime, but hardware stays useful longer these days.

There have been firmware issues across multiple manufacturers where a lifetime counter rolled over and made the drive inaccessible ... if you knew in advance, you could pull those out of service before they failed, but how would you know.

For personal drives, I try to buy one at a time or at least bring them up a few weeks apart. For work drives, sometimes you just end up with a huge batch of servers coming online at the same time. Hopefully backups go to different systems.

reply
trollbridge 2 hours ago
I have a fleet of server pulls which still are running 6-7 years later. In my experience once a drive gets past 50,000 hours, as long as you monitor SMART and temperatures it’ll last forever. (Proper airflow is essential.)

I generally run RAID-1C3 plus a hot spare (periodically take it to C4, and then back to C3 to rotate what the hot spare is), with a cold spare on the shelf. With CephFS it’s a bit different but basically the same idea.

reply
romanhn 3 hours ago
I like the idea of injecting failover into the release process. Another similar approach is chaos engineering, where you intentionally introduce failures to validate your systems' reliability.

When I was at PagerDuty we regularly ran Failure Fridays (perhaps they still do). The goal was to identify a victim sub-system and start applying all sorts of failures to it - excessive latencies, dropped server connections, availability zone outages, etc. It was all done in a controlled manner, with the operations team sitting together with the service owners. The idea was that even if there is an impact to the customer, it's much better to catch it now and fix the underlying issue with many eyes on it, rather than a bleary-eyed on-call dealing with it in the middle of the night. This sort of exercise was very scary to get started with, and only minimally-impacting failures were introduced, but over time we got to the point where we were comfortable with simulating a full region outage.

That said, such investments in reliability made sense for PagerDuty. If a company can survive just fine with 2-3 nines of availability, it's a lot harder to make the business case for it.

reply
mock-possum 2 hours ago
Playing with compounding error/fail/degraded states is one of my favorite things to do during downtime - if I’m light on higher priority work, I’ll dig up a bunch of edge cases and write fixes for them, then turn it into a small writeup to share with the crew, so it doesn’t look like I don’t have enough ‘real’ work to do.
reply
krapcys 3 hours ago
[dead]
reply
pizzafeelsright 4 hours ago
One of my favorite was "Do you trust your RAID?'

Confident "yes"

And then I would put my finger on the tab to pull a drive.

If they didn't flinch I would pull the drive out.

reply
al_borland 57 minutes ago
For years, back when the datacenter was down the hall from the offices, if we were doing an application upgrade we’d first go out and pull one of the drives from the RAID. If everything went well with the upgrade, we’d push the drive back in and let it rebuild. If something went wrong with the upgrade, we’d power down, boot off the drive we pulled, and be back up and running with minimal downtime.

Some nights I would pull dozens of drives. I guess we had a lot of trust in the RAID.

reply
theokrueger 3 hours ago
i trust my RAID but would flinch knowing my hotswap doesn't work :(
reply
nomel 3 hours ago
A certain type of hardware failure is indistinguishable from the drive being pulled out.
reply
j45 3 hours ago
A hotswap raid isn't a raid if you can't pull a drive without thinking. Of course, raid 5-10 is minimum and mandatory.
reply
TacticalCoder 16 minutes ago
[dead]
reply
dangoodmanUT 4 hours ago
This is the philosophy behind FoundationDB.

There aren't "normal" and "recovery" reconfigurations, there's just recovery (with a few exceptions for planned maintenance).

This means: 1) simpler code, 2) you're constantly testing the recovery path, and 3) the recovery path is designed to be quick because it's constantly happening

reply
torvald 4 hours ago
I have a few saying that i often repeat at work, and one of them is; if you are afraid of doing it, you are not doing it often enough.
reply
sovrius 18 minutes ago
Exactly. The only way to know your failover works is to make it the primary path. I apply the same to software: my tools don't have an 'offline mode' — they are offline mode. The network is treated as an optional enhancement (e.g., 'save this file' button writes the HTML to disk), not a dependency. When the internet drops, the user doesn't even notice because nothing changed.
reply
arend321 39 minutes ago
I've gone a bit wild and let an AI agent handle everything. It's a continuous 24/7 maintenance agent updating app dependencies, rebuilding docker containers, creating and testing backups, trigger cluster switchovers, update servers. It's not uncommon for a switchover to happen every 24 hours.
reply
k3vinw 3 hours ago
I worked with a tech lead that basically applied blue-green to regional deployment so we were constantly flipping between the two. The stack was small, so I’ve always thought that was brilliant, but completely overkill until I started working on a project that could actually benefit from that approach.
reply
plandis 3 hours ago
This goes for all resiliency measures. If you’re not practicing and testing your systems under duress you have no clue if they will work as expected when they are actually needed.
reply
bonoboTP 3 hours ago
This stuff is good when there really is a business case for it. But too often it can just be a nerd snipe rabbit hole to build the equivalent of a tank's robustness for some web app with 10 users or some infra where a day of outage would not cause much trouble.

There is such a thing as overkill and using a sledgehammer to crack a nut. It's like when everyone wanted to introduce Kubernetes because Google uses it. Chaos monkey etc are great ideas but diving super deep into this with a prepper's paranoia for all kinds of dreamed up contingencies can be a form of procrastination, unless a business case can be clearly articulated.

reply
intrasight 2 hours ago
I don't think that, with modern stacks, that adding chaos monkey is that big a change - considering the benefits you get from knowing that you in fact have resiliency
reply
The_Blade 2 hours ago
your politics of failover have failed! it's time to make them work again!
reply
stackskipton 4 hours ago
Companies rarely test this because they have no desire to test this. There is no management push to get it done and massive downside in testing causes outages which impacts engineering teams.

Coupled with most companies rarely need uptime they claim they need. Most companies I've worked at, downtime rarely resulted in lost revenue.

reply
mlhpdx 3 hours ago
Perhaps oddly, almost every company I’ve worked at suffered real financial pain as a result of outages. Lost production at one that did quick-turn manufacture to order, and two more with customers that (rightly) demanded steep SLA penalties. None of them got to a point where failover was comfortable.

With my own company I started doing zero downtime deployments (I run hot/hot over multiple AWS regions) literally from day one. Our rate of rollouts has been slower this year than last, with only about 1,500 so far.

Constant failover is a big win in my experience. Hard to retrofit, though.

reply
Blackarea 2 hours ago
Frustrated dev speaking: I'm so tired of this whole sre madness. Canary, failover, firedrills, argol whatever that is, 50million stale dev environments with microservice ai generated state that is completely fake and inconsistent in every single one. Devs wanna just ship a feature to sync some data twice a year but the whole overcomplexity engine that is modern deployments has gone so far that you need to study a million tools before you can do anything meaningful. What happened to just a bash script and some well designed code. For everyone but maybe 5 companies globally we don't need all that shenanigans. But you have to grind your resume driven development and only the most overcomplicated nonsense makes you look serious. This industry is a joke and i can't wait for it to all fall apart
reply
godisdad 2 hours ago
You can acknowledge the risk or not acknowledge the risk.

If you choose to acknowledge the risk you can price the risk or not price the risk.

If you choose to price the risk you can fund the risk.

If you fund the risk you are managing the risk.

I know people who drive around without car insurance, other people who don’t have life insurance. There are also people who are over insured at the other end of the spectrum.

It depends on what you’ve promised people giving you money and what you’re going for.

reply
allthetime 2 hours ago
You can just spin up a couple VPSs and put a load balancer in front and call it a day. No one is stopping you. This is what I generally do, unless something more complicated is truly necessary, and I'm very happy.
reply
Blackarea 2 hours ago
Yeah technically yes, but I'm talking about the standard that modern devops and sre are setting. Suddenly org policies are introduced that force using a company wide helm chart and that base image with that process yada-yada. Maybe there's still places with more autonomy to just spin up whatever, but I see alot of the opposite not just in my org.
reply
allthetime 41 minutes ago
Fair. At a certain scale unfortunately some level of oppressive bureaucracy and structure is probably necessary.

Of course management is often prone to over doing this, and managing engineers are prone to over building.

This is more a general business & people problem that applies to all areas though

reply
jiggawatts 2 hours ago
The public clouds got it right: active-active is the only load balancing mode that should exist.

All of my deployments are zone redundant and all sites are always serving live traffic. Databases write in only one zone but read-only workloads are steered to the replicas at the other zones.

This leads to hilarious audit workshop conversions.

“How often is the secondary site tested?”

“All the time.”

“What does that mean? Monthly?”

“Continuously.”

“Daily?”

“No, it’s tested all the time, moment to moment, request by request. All day, every day.

“Ooookaay… I’ll put down ‘daily’ on the form.”

reply
j45 3 hours ago
One of the best examples I learned in a datacenter setup was to pull cables every so often. :)
reply
UltraSane 4 hours ago
I only trust HA fail over to actually work if companies have been doing frequent switch and stay for years. Switching every 6 months is the minimum IMHO but the more frequently the better.
reply
j45 3 hours ago
Some really good tips and ideas in these comments.
reply
tewpacca 2 hours ago
[dead]
reply
aiagentpro 59 minutes ago
[dead]
reply
highlandlabs 2 hours ago
[dead]
reply
destroyerilands 4 hours ago
[dead]
reply
tonymet 4 hours ago
these are easier said than done, because using failover means potential (and likely ) customer disruption.

The Devil is in the details, and because many tech solutions are a hodgepodge of open source, commercial and home grown components, the failover strategy also needs investment.

Convincing me to do more failover drills is not the hurdle needing overcome. Unlocking the budget to develop and exercise the protocols is the hard part.

reply
computerdork 4 hours ago
You might have missed it further down this article, but this person suggests adding failover to your release process. During a release, you can switch the network traffic to the failover environment, then release updates to the original environment, test them there, then switch back to the original environment.

Worked at company that did this. Didn't know why at the time, but seems like a really good idea.

reply
simonw 4 hours ago
Good failover means zero customer disruption.
reply
solatic 4 hours ago
> customer disruption

Not an excuse. Run a parallel environment that isn’t customer-facing if you’re forced to so that you can drill. Either you’re going to disrupt your customers or an act of God will, and your customers won’t let you scapegoat God.

reply
thakoppno 4 hours ago
> a parallel environment

In my experience, the issue with this is simulating production in a meaningful way. Let’s say you have 10k mobile users, how can traffic approximate that well enough with network conditions, p99 user behavior.

It’s as good as possible but like parent points out, not necessarily worth it.

reply
j45 3 hours ago
Original devops is creating an environment that can be fully rebuilt and reprovisioned effortlessly. 1

With software and solutions, until that exists, there is no failover. Whether it's how a cloud is used, or self-hosting on resources works, or a hybrid.

Disaster planning and other risks are things accounting departments can usually get behind to test and test often. The cloud can seem alluring to pay instead but it doesn't always work out.

reply
XorNot 48 minutes ago
Just because you can reprovision it doesn't mean you can reprovision it quickly enough.

What works with say, 10,000 files might still work 10,000,000 but on no timeframe anyone can tolerate.

reply