For years, much of GitHub.com ran on one main MySQL cluster called mysql1. Repositories, issues, pull requests and much more lived there, so a problem on that cluster could affect almost every feature at once. In 2021 GitHub described how it split that cluster up by moving 130 of its busiest tables out at once, with only a handful of failed writes during the cutover. The average load on each database host halved.
What makes GitHub's story useful is that the hard part wasn't moving data. It was finding out which parts of a huge codebase depended on tables living together, and making those dependencies visible before the move.
What they had
Thomas Maurer's post describes a familiar shape: a large application backed by one main relational database cluster, alongside others. mysql1 held the data for many of GitHub's core features.
A single shared cluster has two costs that grow together:
- Load. Every feature's queries compete for the same primary and replicas.
- Blast radius. An incident on the cluster, whether a bad query, a failover or a capacity problem, reaches every feature that stores data there.