RailsConf 2023 - Migrating Shopify’s Core Rails Monolith to Trilogy by Adrianna Chang

Migrate Shopify's core Rails monolith to Trilogy with improved flexibility, ease of embedding, and performance boosts requiring careful planning and testing.

Key takeaways
  • Migrating a large Rails monolith to Trilogy can be a complex process, but it provides benefits such as flexibility, ease of embedding, and performance improvements.
  • Adapting to Trilogy requires adjusting query options and performance considerations.
  • Multi-statement capabilities are a crucial feature for some workflows, and Trilogy provides a robust solution.
  • The process of migrating from MySQL 2 to Trilogy involved identifying and addressing differences in query flags, timeouts, and error handling.
  • The new query method with multistatements allows for more efficient querying.
  • Test suite modifications are necessary to accommodate Trilogy’s capabilities.
  • The adapter interface needs to be updated to handle multistatements.
  • Using a combination of query flags and protocol capabilities helps to enable multistatement queries.
  • The Trilogy adapter needs to send the correct set option command to enable multistatement behavior.
  • Compatibility issues arise when switching from MySQL 2 to Trilogy due to differences in protocol capabilities and query flags.
  • The process of rolling out Trilogy to production required careful planning and testing.
  • Triage and incident response teams played a crucial role in mitigating service disruptions during the rollout.
  • Providing error messages and handling timeouts are crucial aspects of error handling.
  • Custom caching solutions can be implemented to optimize performance.
  • Migrating a massive Rails application requires careful planning and consideration of potential risks and issues.