The Facebook outage of 2021
medium 26 minOn 4 October 2021 a maintenance command took down every link of Facebook's backbone.
See it run
Replay the failure one step at a time, then run the same event through a safer design.
Operations
A normal day
The two journeys of every visit: first the name, then the request.
Step 1 of 4
Ask for the name
A phone asks a DNS resolver where the site is.
Step 1: Ask for the name
- Who is affected
- Nobody
- Way out
- Not needed
- Both need
- a route that somebody announces
Say both journeys out loud. The outage broke the second one first, and then hid the first.
In the real world
The same the facebook outage of 2021 doing real jobs. Pick one and step through it.
A team tests whether it could repair its system with the main network unplugged.
Step 1 of 4
List the steps
| needs | works? | |
|---|---|---|
| Log in | ||
| Runbook | ||
| Console | ||
| Talk |
Log in, read the runbook, open the console, undo, announce.
Step 1: List the steps
Common mistakes
The bugs interviewers watch for, with the fix beside each.
One command for the whole network
criticalA mistake reaches every site at once and takes the tools with it.
Wrongapply(command, all_regions)Rightfor region in regions: arm_undo(region) apply(command, region) check_then_confirm(region)Health checks without a floor
criticalA shared fault makes every copy remove itself.
Wrongif not sees_dc(me): withdraw(me)Rightif not sees_dc(me) and others_healthy() >= floor: withdraw(me)A rescue path that shares something
criticalIt fails together with what it should repair.
Wrongconsole = vpn + production_dns + sign_inRightconsole = own_line + local_names + local_accountsA guard nobody tests
majorA bug in it stays hidden until the day it matters.
Wrongassert audit(good_command) == "ok"Rightassert audit(good_command) == "ok"for bad in known_bad: assert audit(bad) == "refused"
Interview tips
How to explain it
- Trigger: a command. Cause: all backbone links down. Symptom: DNS.
- Name servers withdrew as designed, all at once.
- Repair was slow because access and tools were down too.
Memory trick
- Bridge, lamp, keys.
- The network went, the names went, the way in went.
Design it in
- Waves and an undo timer for changes.
- A floor for health checks.
- A rescue path that shares nothing and is drilled.
Say carefully
- Facebook's reports give no clock times; outside times are Cloudflare's.
- Do not quote money figures without a source.
- Talk about the system, not about one person.