How teams scaled MySQL: 10 real case studies

10 of the 73 engineering write-ups in our database mention MySQL in their stack. They come from 6 companies (Shopify, GitHub, Canva, Meta, PlanetScale and 1 more) and were published between 2013 and 2026. Techniques that show up most often alongside MySQL: database migration (3), horizontal sharding (3), caching (2) and online migration (2). It's often paired with Vitess (4) and Ruby on Rails (2). 7 of the 10 state concrete scale numbers, for example "hundreds of millions of users" (Canva). Each card below links to our short summary and the original post.

Canva · 2026

Session revocations at scale

Canva keeps 12 hours of session revocations in memory on every gateway, but hundreds of pods each loading over a million revocations from MySQL on deploy caused a stampede on the database. A worker now packs revocations into sorted 16-byte records in 30-minute chunks on S3, using conditional PUTs for optimistic concurrency and ZooKeeper leader election to avoid conflicts, and reaches over 2,000 revocations per second. Gateways binary-search the downloaded bytes directly and poll with conditional GETs, which shrank the cache by 87.5% and cut the revocation database down to two read replicas kept for redundancy.

hundreds of millions of usershundreds of thousands of session checks/seccachingobject storageoptimistic concurrency controlMySQLAmazon S3ZooKeeper
Shopify · 2026

We replaced Redis with MySQL for inventory reservations—and it scaled

Shopify moved checkout inventory reservations from Redis to MySQL using one row per sellable unit, a bounded pool of 1,000 rows per item/location and SELECT ... FOR UPDATE SKIP LOCKED. The real ceiling was connections held by other checkout code: tagging SQL by business process and measuring hold time in ProxySQL found it, and the cleanup removed 50% of reads and 33% of transactions on the primary.

$5.1 million sales/minute (Black Friday 2025 peak)database migrationdual writesquery optimizationMySQLRedisProxySQL
Shopify · 2024

Horizontally scaling the Rails backend of Shop app with Vitess

Shopify's Shop app adopted Vitess to shard its Rails backend, covering keyspace design and the migration plan.

horizontal shardingdatabase migrationMySQLVitessRuby on Rails
GitHub · 2023

Upgrading GitHub.com to MySQL 8.0

How GitHub upgraded its whole MySQL fleet to 8.0 with staged replicas and a working rollback path.

5.5 million QPS300+ TBfleet upgradereplicationrollback planningMySQL
PlanetScale · 2022

One million queries per second with MySQL

PlanetScale benchmarked a horizontally sharded Vitess cluster up to one million QPS.

1 million QPShorizontal shardingbenchmarkingMySQLVitess
GitHub · 2021

Partitioning GitHub's relational databases to handle scale

GitHub defined schema domains and linted cross-domain queries so it could move table groups onto separate MySQL clusters.

vertical partitioningschema domainsonline migrationMySQLRuby on RailsVitess
Shopify · 2021

Shard Balancing: Moving Shops Confidently with Zero-Downtime at Terabyte-scale

Shopify rebalances MySQL shards by moving individual shops online with its Ghostferry tool.

terabyte scaleshard rebalancingonline migrationzero downtimeMySQLGhostferry
Shopify · 2021

Read Consistency with Database Replicas

Shopify routes reads to MySQL replicas while giving apps consistency guarantees such as monotonic reads.

read replicasconsistencyMySQL
Slack · 2020

Scaling Datastores at Slack with Vitess

Slack's multi-year migration from active-active MySQL pairs to Vitess, so data could be sharded by any key, not only workspace.

2.3 million QPShorizontal shardingdatabase migrationMySQLVitess
Meta · 2013

TAO: The power of the graph

TAO is Facebook's geo-distributed graph cache over sharded MySQL, serving the social graph at more than a billion reads per second.

over 1 billion reads/secmillions of writes/seccachinggeo-distributiongraph data modelMySQLMemcache

Get new MySQL scaling stories weekly

One email a week. No spam.

Subscribe

Browse all 87 topics →