Scaling Rails to 2M MySQL requests per second
summary
Intercom hits 2 million MySQL requests/sec and solves it with concrete tactics: deploys identity_cache to cut DB reads (cache serves ~10M reads, but introduces stale-read consistency tradeoffs), moves heavy reads to replicas using a proxy adapter (complex, Rails-API fragile), horizontally shards a 25-billion-row conversations table into per-customer shards to make migrations resumable, and migrates off Aurora to PlanetScale/Vitess to split into 128 smaller nodes and enable near zero‑downtime resharding and host replacement.
AI-written summary · about
chapters (11)
- 0:00Scaling Rails at Intercom
- 1:52Why Intercom needs 2 million database requests per second
- 2:55Vertical scaling trade-offs
- 6:22Vertical sharding in 2014
- 8:44Feature-specific databases
- 10:102015 outages and caching
- 15:23Read replicas in 2016
- 20:41Horizontal sharding in 2019
- 24:57Aurora upgrade in 2024
- 26:00Migrating to PlanetScale
- 28:07Summary and future plans








