Murdering our Mongo Database (or how we migrated to a relational database)
summary
A migration from MongoDB to MySQL with zero downtime that actually explains how: design relational schemas to accept missing fields, implement dual writing to both stores, backfill documents via the API, and flip reads gradually using scientist experiments that surface mismatches. Found bugs include an off‑by‑one index error and MySQL silently accepting invalid enum writes. Operational lessons: EC2 instance‑store wiped data during an upgrade, Prometheus load caused thousands of concurrent connections, and request‑cursing plus Jaeger tracing reveal lingering Mongo usage.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:53What is MongoDB
- 3:28Tradeoffs
- 4:49Why MongoDB
- 6:18Migration
- 7:53Monolith Architecture
- 8:56Issues with Mongo
- 13:43No ORM
- 15:04Removing Mongo
- 16:55Migration in small steps
- 17:23Migrating records
- 19:04Testing in production
- 21:30Switching to MySQL
- 24:18Why API from Mongo
- 25:19Conclusion
related talks
44mMongoDB to MySQL the How and the Why
29mSwitching to MongoDB: The challenges of translating database schemas
40mData Migration Lessons from the Trenches
43mCRIMS: The case of the DB change that left no trace
15mDo's and Dont's of the modern hybrid mongoDB MySQL environment
34mHow we migrated our database to the cloud
30mHelp! I Need To UnSQLize My Application
25mCourting Mongo, committing to Postgres: Our data love story!
