GitHub: Forty-Three Seconds
Hard · system design problem
A 43-second partition made the database fail over to the other coast. Every query now crosses the country, the new primary is still catching up — and background jobs want the same write capacity as users.
Inspired by GitHub’s October 2018 incident: 43 seconds of lost connectivity led its orchestration to promote database primaries on the other coast, leaving applications writing across the country; GitHub degraded service for a day and paused webhooks and Pages builds to protect user traffic. Here: the app tier (east) now talks to the promoted primary in the west: from T+20s every query takes +60 ms, and for five minutes the primary runs at half capacity while it replays its backlog. Background jobs (webhooks, builds) are queued in Kafka and written by job workers; they may run up to 30 minutes late. Users come first, and the run is graded on the whole recovery — by the end, the job backlog must be shrinking again.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.