AlgoViz

The Facebook outage of 2021

medium 26 min

On 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

Facebook's networkname?askrequestPeopleDNS resolverName serversannouncedFront doorBackbonelinks upData centerrunning

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

needsworks?
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

    critical

    A mistake reaches every site at once and takes the tools with it.

    Wrong
    apply(command, all_regions)
    Right
    for region in regions:    arm_undo(region)    apply(command, region)    check_then_confirm(region)
  • Health checks without a floor

    critical

    A shared fault makes every copy remove itself.

    Wrong
    if not sees_dc(me):    withdraw(me)
    Right
    if not sees_dc(me) and others_healthy() >= floor:    withdraw(me)
  • A rescue path that shares something

    critical

    It fails together with what it should repair.

    Wrong
    console = vpn + production_dns + sign_in
    Right
    console = own_line + local_names + local_accounts
  • A guard nobody tests

    major

    A bug in it stays hidden until the day it matters.

    Wrong
    assert audit(good_command) == "ok"
    Right
    assert 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.