Outage4 Oct 2021

Facebook Disappears from the Internet

A maintenance command cut off every Facebook data centre, and its DNS servers then hid themselves from the internet.

Severity
History books
Difficulty
intermediate
Companies
Meta, Facebook, Instagram, WhatsApp
Tech
BGP, DNS, Backbone network, Out-of-band access
Root cause
operator mistake, latent bug, network control plane, dependency cascade

The story

Quick (1 min)

On 4 October 2021, Facebook, Instagram, WhatsApp and Messenger vanished for about six to seven hours worldwide.

During routine maintenance, an engineer ran a command meant to check how much capacity Facebook's private global network had. Instead it disconnected all of Facebook's data centres from each other and from the internet. A tool designed to block dangerous commands had a bug and let it through.

Then a safety feature made things worse. Facebook's DNS servers, which act as the "address book" that tells the internet where facebook.com is, are designed to hide themselves if they can't reach the data centres. They all hid at once, so nobody could find Facebook at all.

Engineers couldn't log in remotely, so they had to go to data centres in person to fix it.

The lesson: safety mechanisms need to be tested for the case where everything fails at once.

Keep reading to the end to earn XP.Read. XP earned.

Engineer (2 min)

The backbone. Meta connects its data centres with a private backbone: tens of thousands of miles of fibre. Smaller edge facilities connect that backbone to the internet and also host Meta's authoritative DNS servers.

The command. During maintenance, "a command was issued with the intention to assess the availability of global backbone capacity, which unintentionally took down all the connections in our backbone network." An audit tool meant to stop commands like this had a bug that "prevented it from properly stopping the command."

The DNS amplifier. The DNS servers' IP addresses are advertised to the internet using BGP. As a health check, each DNS site withdraws its BGP advertisements if it can't reach the data centres, a sensible rule when one site is broken. With the whole backbone gone, every site declared itself unhealthy and withdrew. The DNS servers were still running, but unreachable.

Outside view. Cloudflare saw a peak of BGP changes from Facebook around 15:40 UTC. Public resolvers like 1.1.1.1 and 8.8.8.8 started returning SERVFAIL. Apps and users retrying drove about 30 times more queries than usual to Cloudflare's 1.1.1.1 resolver.

Why recovery was slow:

  • Primary and out-of-band network access were both down.
  • Losing DNS broke many internal tools.
  • Engineers went on-site, but data centres are deliberately hard to enter and their hardware is hard to modify even with physical access.

Careful restart. When the backbone came back, Meta brought services up gradually. Data centres had dropped tens of megawatts of power use, and a sudden reversal could stress electrical systems and caches. "Storm" drills that simulate losing a region helped.

Interview takeaway: health checks that are local and sensible can fail together, and your recovery path must not depend on the system that's down.

Keep reading to the end to earn XP.Read. XP earned.

Deep dive (2 min)

Timeline (UTC; from Meta's engineering post, Cloudflare's analysis and Wikipedia)

  • ~15:39–15:40: Facebook makes a large number of BGP updates, including withdrawing routes to the prefixes holding all its authoritative nameservers (Cloudflare, Wikipedia).
  • 15:51: Cloudflare opens an incident, "Facebook DNS lookup returning SERVFAIL", and at first worries its own resolver is at fault.
  • 15:58: Cloudflare confirms Facebook has stopped announcing routes to its DNS prefixes.
  • Hours following: engineers are dispatched to data centres. Secure access protocols take time. Internal tools that depend on DNS are broken.
  • ~21:00: renewed BGP activity from Facebook's network, peaking at 21:17 (Cloudflare).
  • ~22:45–22:50: Facebook and related services generally available again (Wikipedia).

Meta's account of the mechanism

"Our systems are designed to audit commands like these to prevent mistakes like this, but a bug in that audit tool prevented it from properly stopping the command."

"To ensure reliable operation, our DNS servers disable those BGP advertisements if they themselves can not speak to our data centers, since this is an indication of an unhealthy network connection... The end result was that our DNS servers became unreachable even though they were still operational."

The security vs recovery trade-off

Meta noted that years of hardening against unauthorised access slowed its own recovery. Facilities are "hard to get into, and once you're inside, the hardware and routers are designed to be difficult to modify." Its conclusion: "a tradeoff like this is worth it — greatly increased day-to-day security vs. a slower recovery from a hopefully rare event like this."

Restarting at planet scale

Turning everything back on at once risked "a new round of crashes due to a surge in traffic." Storm drills had practised taking services, data centres and regions offline, but "we've never previously run a storm that simulated our global backbone being taken offline."

Wider effects (Wikipedia)

  • "Log in with Facebook" broke on third-party sites.
  • Employees reportedly couldn't use some internal systems or badge into buildings.
  • Downdetector recorded over 10 million problem reports.
  • Twitter, Telegram and other platforms saw slowdowns as users moved over.
  • Fortune and Snopes estimated at least $60 million in lost advertising revenue (not a figure from Meta).

Keep reading to the end to earn XP.Read. XP earned.

Failure replay

Step by step, what broke and what it hit next.

  1. ~15:39
    Maintenance commandfailing

    A command meant to assess backbone capacity is issued. The audit tool that should block it has a bug.

    Affects: Backbone network

  2. ~15:39
    Backbone networkdown

    Every backbone connection drops. Data centres are cut off from each other and the internet.

    Affects: DNS edge sites, Data centres

  3. ~15:40
    DNS edge sitesfailing

    Each DNS site can't reach the data centres, so by design it withdraws its BGP routes. All of them do it at once.

    Affects: Internet resolvers

  4. 15:51
    Internet resolversdegraded

    Resolvers like 1.1.1.1 and 8.8.8.8 return SERVFAIL for facebook.com. Retries push query volume up about 30x.

    Affects: Users

  5. 15:51+
    Usersdown

    Facebook, Instagram, WhatsApp and Messenger are unreachable worldwide.

  6. Hours
    Data centresdown

    Remote and out-of-band access are gone and DNS-dependent tools fail. Engineers travel on-site and work through strict physical security.

  7. ~21:00
    Backbone networkrecovering

    The backbone is restored and BGP announcements resume.

    Affects: DNS edge sites, Data centres

  8. ~21:00–22:50
    Data centresrecovering

    Services come back gradually to avoid power and traffic surges. Storm-drill practice pays off.

    Affects: Users

Impact

Who was affected
Users of Facebook, Instagram, WhatsApp, Messenger and Oculus worldwide, plus sites using "Log in with Facebook" and Meta's own employees.
How long
About six to seven hours (from ~15:39 UTC to ~22:45–22:50 UTC).
Cost
not disclosed by Meta (Fortune and Snopes estimated at least $60 million in lost ad revenue).

Lessons

  • Audit tools and safety checks are critical code; test them as rigorously as the systems they protect.
  • Health checks that make sense for one node can cause total failure when every node trips at once.
  • Out-of-band access must truly be independent of the production network and DNS.
  • Practise restarting from total failure; bringing everything back at once can cause new outages.
  • Security hardening and fast recovery pull against each other; choose the balance deliberately.

Quiz

  1. What started the Facebook outage?

    Check answer

    A maintenance command that took down all backbone connections, which a buggy audit tool failed to stop. The command was meant to assess capacity but disconnected every data centre. The audit tool meant to block it had a bug.

  2. Why did Facebook's DNS servers become unreachable even though they were running?

    Check answer

    They withdrew their own BGP routes because they couldn't reach the data centres. The DNS sites are designed to stop advertising routes when unhealthy. With the whole backbone down, all of them withdrew.

  3. Why did engineers have to go to data centres in person?

    Check answer

    Primary and out-of-band network access were down, and DNS loss broke internal tools. Normal remote access paths depended on the network that was down.

  4. Why didn't Meta turn everything back on at once?

    Check answer

    A sudden surge could cause new crashes and stress power systems after dips of tens of megawatts. Meta brought load back gradually, drawing on "storm" drills, to avoid traffic and power surges.

Interview prep

Try answering out loud before you open the model answer.

  1. system design

    Meta's DNS servers withdrew their BGP routes when they couldn't reach the data centres. Why was that a reasonable design, and how would you make it safe?

    Show model answer

    For one broken site, withdrawing routes is correct: traffic shifts to healthy DNS sites. The flaw is that every site used the same signal, so a backbone-wide failure made all of them withdraw together and took DNS offline entirely, even though the DNS servers were fine. Safer designs: a global floor, so at least N sites keep advertising no matter what; use a quorum or external view of health rather than a purely local one; let DNS keep serving stale but valid answers when the backend is unreachable; and test the "everything is unhealthy" case.

    A strong answer hits:

    • Local health-based withdrawal is good for isolated failures
    • Correlated failure makes every site withdraw together
    • Minimum-advertising floor or quorum logic
    • Serve stale answers rather than disappearing
  2. system design

    How do you design out-of-band access so engineers can recover from a total network failure?

    Show model answer

    Out-of-band means it doesn't share fate with production: separate circuits or carriers (or cellular), separate DNS and authentication (or local fallbacks like cached credentials and hard-coded IPs), console servers in every facility, and documented physical-access procedures that are fast enough in an emergency. Meta's primary and out-of-band access were both down and many tools needed DNS. Test it regularly by simulating loss of the production network, and balance physical security with emergency access, for example pre-authorised on-site responders.

    A strong answer hits:

    • No shared fate with production network, DNS or auth
    • Console servers and separate circuits
    • Fast, rehearsed physical-access procedures
    • Regular drills
  3. behavioural

    Your company hardened security so much it slowed recovery from a self-inflicted outage. How would you approach that trade-off?

    Show model answer

    Acknowledge both sides. Meta argued slower recovery from rare events was worth stronger day-to-day security. I'd quantify it: how likely and how costly is each failure mode? Then look for options that keep security while speeding emergencies: break-glass procedures with strong auditing, pre-staged on-site staff, two-person rules instead of lengthy approvals. Practise the emergency path so its cost is known.

    A strong answer hits:

    • Explicit risk trade-off, not a default
    • Audited break-glass procedures
    • Practise the emergency path

Go deeper