Cases3 cases
1 to 3 of 3
IL-0210GitHub's MySQL clusters failed over to the US West Coast and the site served slow, stale, inconsistent data for 24 hoursGitHub2018- Symptoms
At 22:54 UTC on 21 October 2018 GitHub's internal monitoring started alerting on many faults at once. By 23:02 UTC the first responders saw that the replication topologies of many MySQL clusters were in an unexpected state: the Orchestrator API showed topologies made only of servers in the US West Coast data center. When connectivity came back, the application tier had immediately started sending writes to the new West Coast primaries.
- Trigger
At 22:52 UTC on 21 October, routine maintenance to replace failing 100G optical equipment cut connectivity between GitHub's US East Coast network hub and its primary US East Coast data center for 43 seconds.
- Root cause
- Component
- Contributing factor
- Detection
GitHub's internal monitoring raised alerts on numerous faults at 22:54 UTC, two minutes after the partition. By 23:02 UTC the first responders had found, by querying the Orchestrator API, that many database clusters had a topology with only US West Coast servers.
- Remediation
- Locked the internal deployment tooling to stop further changes
- Paused webhook delivery and GitHub Pages builds to stop jobs writing metadata
- Restored the affected MySQL clusters from backups into the US East Coast data center and let them replicate from the West Coast
- Found ways to restore directly from the West Coast to get around the throughput limits of downloading from off-site storage
- Moved all database primaries back to the US East Coast data center
- Spread read traffic over additional MySQL read replicas in the US East Coast public cloud so replication could catch up
- Failed over to the original topology once the replicas were in sync
- Processed the backlog of webhook events and Pages builds, pausing to raise an internal TTL after about 200,000 webhook payloads were dropped
- Action items
- Reconcile the writes from the captured MySQL binary logs that were not replicated, automatically where possible and with user outreach otherwise
- Make sure status updates can be published even when GitHub Pages builds are paused
- Give more accurate public estimates of the time to repair
- Configure Orchestrator so it cannot promote database primaries across regional boundaries
- Move to a status reporting mechanism that shows the status of each component of the platform
- Serve GitHub traffic from multiple data centers in an active/active/active design with N+1 redundancy at the facility level
- Test assumptions about the system more proactively
- Validate failure scenarios systematically, with investment in fault injection and chaos engineering tooling
- Lessons
Orchestrator did what it was configured to do, but the application tier could not work with primaries on the other side of the country: leader election within one region is generally safe, while the sudden cross-country latency was a major contributing factor. The behaviour emerged from a partition larger than any GitHub had seen. Replication caught up along a power decay curve, not a straight line, so the linear estimates of recovery time were wrong. GitHub concluded that tighter operational controls and faster response are not enough on their own and that failure scenarios have to be validated before they happen.
IL-0303GitHub's MySQL master failed over to a node with a cold buffer pool during a schema migration and GitHub.com went downGitHub2012- Symptoms
On Monday, September 10th, 2012, during a schema migration, the health checks on GitHub's MySQL master failed and Percona Replication Manager moved the 'active' role to another node of the new three-node cluster. That node's InnoDB buffer pool was cold and it performed poorly, its health checks failed in turn, and the role failed back to the original server. GitHub.com went down.
- Trigger
A schema migration on Monday, September 10th put more load on the master database than earlier migrations had, and Percona Replication Manager's health checks on the master failed.
- Root cause
- Component
- Contributing factor
- Detection
On the morning of September 11th, a developer told the operations team that the 'standby' node was returning incorrect query results.
- Remediation
- Enabled Pacemaker's maintenance-mode so no health checks or automatic failovers ran, and let the buffer pool warm
- Powered off the out-of-date node 'c' to end the partition
- Stopped Pacemaker and Heartbeat on nodes 'a' and 'b' and started them on node 'a' only
- Started MySQL on node 'a' in the active role
- Removed the events leaked to wrong dashboards and audited the wrongly routed repositories
- Contacted the owners of the exposed private repositories
- Action items
- Change the Pacemaker configuration so the active database role fails over only when an operations engineer starts it
- Find a way to warm the InnoDB buffer pool of slave databases so failovers do not hurt performance
- Audit the Pacemaker and Heartbeat stack, focusing on the code path behind the segfault
- Run hardware tests on the server where the segfault happened
- Lessons
GitHub concluded that automated failover is not the right strategy for its primary production database: for every failover in this incident, any member of the operations team would have said it should not happen. Failovers that must happen, in an emergency or during maintenance, should not hurt performance.
- Symptoms
From 12:47 AM PDT on 21 April 2011, a subset of Amazon EBS volumes in one Availability Zone of the US East Region could no longer serve reads or writes, and EC2 instances that tried to use them got stuck as well. AWS called these "stuck" volumes. EBS API calls across the whole US East Region also returned high error rates and latencies during two periods on the first day.
- Trigger
During a routine network change to upgrade the capacity of the primary EBS network in one Availability Zone, traffic was to be shifted off one of the redundant routers. The shift was executed incorrectly and sent the traffic onto the lower-capacity replication network instead of the other primary router, which could not carry it.
- Root cause
- Component
- Contributing factor
- Remediation
- Rolled back the incorrect traffic shift, which restored network connectivity
- Disabled all new Create Volume requests in the affected Availability Zone at 2:40 AM PDT
- Disabled all communication between the degraded EBS cluster and the EBS control plane from 8:20 AM PDT
- Stopped EBS servers in the degraded cluster from futilely contacting other servers for free space
- Changed the EBS control plane so new EBS-backed instance launches stopped failing
- Moved spare server capacity physically from across the US East Region into the degraded cluster
- Adjusted the negotiation throttles so the new servers could join without flooding the old ones
- Built a separate EBS control plane partitioned to the affected zone and finer-grained throttles, then processed the backlog
- Restored the remaining volumes from S3 snapshots taken early in the event
- Restored volumes on failed machines that had no snapshot after forensic work
- Intervened by hand on the RDS multi-AZ instances that did not fail over automatically
- Action items
- Audit the change process and add automation to prevent the traffic shift mistake
- Change capacity planning and alarming to keep the extra safety capacity needed for large recovery events
- Change the retry logic in EBS nodes to back off harder and reconnect to previous replicas instead of searching for new nodes
- Test and deploy the fix for the race condition that crashed EBS nodes
- Fix the RDS bug that kept multi-AZ instances from failing over automatically
- Improve the EBS control plane timeout logic to prevent thread exhaustion when one zone's cluster is slow
- Make the EBS control plane aware of Availability Zones so it sheds load when over capacity
- Move more EBS control plane functions into per-cluster services that run in the same zone as the cluster
- Offer multiple Availability Zones to Amazon VPC customers
- Provide better tools for building multi-AZ applications that survive the loss of a zone
- Host free webinars and publish whitepapers on fault-tolerant architecture
- Build the fine-grained control and throttling used in recovery into the EBS nodes and automate the recovery models
- Look at changes that keep volumes working while a cluster is degraded, including the ability to take a snapshot of a stuck volume
- Send more frequent and detailed customer updates and staff developer support more widely during events
- Develop tools that show through the APIs whether instances are impaired
- Lessons
AWS writes that with more spare capacity the cluster would have absorbed the re-mirroring requests without a storm, and that it now understands how much capacity large recovery events need. The event also showed that the EBS control plane let a failure in one Availability Zone affect the others, so more work is needed to make zones behave as if completely independent. AWS adds that some customers had critical components in a single zone, and that multi-AZ deployments need to become easier to design and run.
These 3 cases involve Database and Database replication. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.
By root cause3
DNS or network fault1 case
- Component
- Contributing factor
- Organisation
Software defect1 case
- Contributing factor
- Organisation
Operator error1 case
- Component
- Contributing factor
- Organisation