Migrating Shopify’s Core Rails Monolith to Trilogy
summary
Shopify replaces Mysql2 with Trilogy in its largest Rails monolith, adding multi-statement support to the Trilogy Ruby bindings, upstreaming the ActiveRecord adapter into Rails 7.1, and adapting tools like Semian and OpenTelemetry. Rollout runs at 1% of pods, then 100% of a cluster, then full production; CI stays on Mysql2 while daily Trilogy branch tests run. Observed latencies drop from 3.46 ms to 2.7 ms (≈22% faster) and per-query time from 1.49 ms to 1.24 ms.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 0:36Meet Adrianna
- 2:34Agenda
- 3:11Climbing a Mountain
- 3:44What is Trilogy
- 5:13Why switch to Trilogy
- 6:31Caveats to Trilogy
- 7:44Why Trilogy
- 9:14Making Trilogy a Rails Community Standard
- 9:30Moving to Trilogy in an Existing Rails App
- 14:58Other Considerations
- 18:26External Tooling
- 22:04Scaling
- 24:10Upstream Trilogy to Rails
- 27:14Conclusion








