Migrating Shopify’s Core Rails Monolith to Trilogy

July 14, 2023 38 min Free

Description

Trilogy is a client library for MySQL-compatible databases, open-sourced by GitHub with an Active Record adapter. This talk details Shopify's migration of their core Rails monolith from Mysql2 to Trilogy, aiming for improved performance, better portability, and fewer dependencies. The presentation covers the MySQL protocol, how the Active Record adapter interfaces with Trilogy, implementation of missing features, and the production migration process, including lessons learned and performance improvements. A surprise announcement reveals Trilogy's integration into Rails starting with version 7.1.