43 Seconds Offline, 24 Hours to Recover: How GitHub's Failover Backfired
A network link was down for 43 seconds. In that time, GitHub’s failover moved its database primaries across the country, away from the applications that used them. Undoing that one automatic decision took 24 hours and 11 minutes.
Get the Claude skillFree Claude skill · read-only
Failover check
Claude reads your database, failover and infrastructure config and tells you what your automation would do if one data center went silent for a minute, and whether you could undo it, with file and line evidence and the first fix to make.
- The primary stays near its apps Automatic failover can’t promote a replica in another region.
- Waiting matches the cost A blip can’t trigger a move that takes a day to undo.
- Promotion knows the replication Async copies that may be behind aren’t promoted blindly.
- The old primary is fenced A cut-off primary stops taking writes, and divergence is caught.
- Big moves need a person Large, hard-to-undo actions wait for a human decision.
- A full rebuild is timed The whole cluster, from backup, under real load.
- Queues outlast the outage No work silently expires, and replay is rate-limited.
- Partitions are rehearsed Someone has cut a whole site off on purpose.
Check your inbox.
The download link is on its way. It can take a minute, so check spam if it doesn’t show up. The link works for 30 days.
Install: unzip into ~/.claude/skills/ for Claude Code, or upload the zip under Skills in Claude’s settings. Then ask: “Run the failover check on this repo.”
What happened
Forty-three seconds of silence.
At 22:52 UTC on Sunday 21 October 2018, maintenance on failing network equipment cut the link between GitHub’s East Coast network hub and its main East Coast data center. The link came back 43 seconds later. GitHub.com wasn’t fully healthy again for 24 hours and 11 minutes. For most of that time it showed out-of-date, inconsistent issues and pull requests, webhooks stopped going out, and Pages sites stopped building. Git repositories stayed available throughout.
GitHub’s MySQL failover tool, Orchestrator, ran on nodes in several sites, placed so that no single data center made a majority. During the cut, the nodes on the West Coast and in the public cloud agreed the East Coast primaries were gone and promoted West Coast replicas. When the link returned, the applications, still on the East Coast, sent their writes across the country. The old East primaries held several seconds of writes the West never received, so the primaries couldn’t simply move back.
Staying meant East Coast applications paid a cross-country round trip on most database calls, which they couldn’t cope with. Moving back meant throwing away the writes users had made on the West Coast since. GitHub chose to fail forward: keep the West Coast data, rebuild the East from backups, and accept a degraded site. In its words, “We believe that the extended degradation of service was worth ensuring the consistency of our users’ data.”
The safety net
Every part worked. The whole system didn’t.
- Failure detectionTimed out correctly. From the West, a cut-off primary and a crashed one look the same.
- Raft quorumA valid majority. It proved the voters were connected, not that the East was gone.
- Asynchronous replicationFast by design, and it left several seconds of writes stranded on the old primaries.
- Consul and the proxiesFollowed the new primaries, so every write crossed the country.
- BackupsTaken every four hours and tested daily, but never used to rebuild a whole cluster until that day.
What to take away
Automate what you can undo.
- Keep the primary where the application can reach it.
- Match the waiting time to the cost of the action.
- Decide in advance where writes may be lost, and tell the failover.
- Time your worst-case restore, under real load.
- Size queues for the longest outage you plan to survive.
- Rehearse the failure you haven’t seen yet.
If one data center went silent for forty-three seconds, what would your automation do, and could you undo it?
Check your own repository with the skill