---
title: "Upgrading GitHub.com to MySQL 8.0"
description: "GitHub upgraded 1200+ MySQL hosts (300+ TB, 5.5M QPS, 50+ clusters, including Vitess) from 5.7 to 8.0 over more than a year without breaking SLOs."
url: "https://swe.quest/articles/upgrading-github-com-to-mysql-8-0-2c7892d15b6d7ff3"
canonical: "https://github.blog/engineering/infrastructure/upgrading-github-com-to-mysql-8-0/"
source: "GitHub Engineering"
published: "2023-12-07"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["mysql","replication","deployment","databases"]
---

# Upgrading GitHub.com to MySQL 8.0

A post on [GitHub Engineering](https://swe.quest/sources/github.md), published 2023-12-07, 11 min read, Case study. Original: [https://github.blog/engineering/infrastructure/upgrading-github-com-to-mysql-8-0/](https://github.blog/engineering/infrastructure/upgrading-github-com-to-mysql-8-0/)

## Summary

GitHub upgraded 1200+ MySQL hosts (300+ TB, 5.5M QPS, 50+ clusters, including Vitess) from 5.7 to 8.0 over more than a year without breaking SLOs. The rollout went in stages: rolling replica upgrades per data center, then a replication topology with parallel 5.7 and 8.0 chains, then an Orchestrator graceful failover to an 8.0 primary, and finally cleanup after a 24-hour validation. Keeping rollback possible required backward replication from 8.0 to 5.7, which meant pinning utf8/utf8\_unicode\_ci collation and working around 8.0 role statements. Other problems included a commit-order replication hang fixed in 8.0.28, Vitess VTgate version advertising, and large WHERE IN queries that crashed MySQL in production despite passing CI.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [MySQL](https://swe.quest/tags/mysql.md) (Data & databases)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)

## Prerequisites

- MySQL replication ([easy posts on MySQL](https://swe.quest/tags/mysql.md?difficulty=easy))
- primary/replica topology
- database failover ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))

## Keywords

MySQL 8.0, Vitess, Orchestrator, freno, gh-ost, Trilogy, GTID

## Related posts

- [Migrating Facebook to MySQL 8.0](https://swe.quest/articles/migrating-facebook-to-mysql-8-0-5af9e565f1e50eea.md): Meta Engineering · 2021-07-22 · Medium · 11 min read · MySQL, Schema migrations, Replication, Refactoring & migrations, Testing
  Facebook moved its MySQL fleet from a heavily customized 5.6 branch straight to 8.0, skipping 5.7.
- [Partitioning GitHub’s relational databases to handle scale](https://swe.quest/articles/partitioning-github-s-relational-databases-to-handle-scale-7b5ea75acfc088c0.md): GitHub Engineering · 2021-09-27 · Medium · 9 min read · MySQL, Distributed databases, Scaling, Schema migrations, Ruby
  GitHub split its monolithic \`mysql1\` MySQL cluster by first virtually partitioning tables into schema domains (declared in YAML) and enforcing boundaries with query and transaction linters, then physically moving domains to new clusters via Vitess vertical sharding or a custom ProxySQL/GTID-based write-cutover script.
- [Upgrading MySQL at Shopify](https://swe.quest/articles/upgrading-mysql-at-shopify-bb0f87b54fe985d5.md): Shopify Engineering · 2021-12-02 · Hard · 16 min read · MySQL, Replication, Debugging, Deployment, Cloud platforms
  Shopify moved hundreds of horizontally sharded Percona Server shards, thousands of VMs in all, from 5.7.21 to 5.7.32, mainly to get writeset-based replication parallelism across replication topologies up to four hops deep.
- [Beyond synthetic testing: Capturing and replaying real database workloads at Airbnb](https://swe.quest/articles/beyond-synthetic-testing-capturing-and-replaying-real-database-workloads-at-ad8d4a3a0c1cef6e.md): Airbnb Engineering · 2026-10-06 · Medium · 11 min read · MySQL, Testing, Capacity planning, Performance engineering, Databases
  Airbnb replaced fragmented per-language client-side query logging with a client-agnostic capture point in ProxySQL, so real production MySQL traffic can be replayed offline.
- [How we improved availability through iterative simplification](https://swe.quest/articles/how-we-improved-availability-through-iterative-simplification-1aa63e0def5687e6.md): GitHub Engineering · 2024-07-23 · Medium · 6 min read · Performance engineering, MySQL, Ruby, Observability, Deployment
  GitHub cut timeouts in its Rails monolith with small, measured changes found through Datadog metrics, Splunk logs and custom MySQL slow-query monitors.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
