The Ruby and Rails Infrastructure team at Shopify exists to help ensure that Ruby and Rails are 100-year tools that will continue to merit being our toolchain of choice.| Rails at Scale
Now rack.response_finished is my best friend.| Rails at Scale
AI coding tools are dissolving the language barriers that once defined our careers. As someone who coded exclusively in Ruby for a decade, I’m now contributing to low-level system projects I couldn’t have touched before. Here’s how AI coding agents enabled my leap from Ruby to C, C++, and Rust.| Rails at Scale
In this post I share a bit about the first part of my Ruby open-source sabbatical experience here at Shopify.| Rails at Scale
We implemented a new feature to TypedData objects in Ruby, called embedded TypedData objects. TypedData objects are used across a wide variety of Ruby types, such as Time, Enumerator, and Method. This feature improves allocation speed and runtime performance, while decreasing memory usage. In this blog post, we’ll look at what TypedData objects are under the hood, how embedded TypedData objects work, and the performance impacts of embedded TypedData objects.| Rails at Scale
A quick tip for handwriting database agnostic SQL queries| Rails at Scale
Many Ruby applications allocate objects. What if we could make allocating objects six times faster? We can! Read on to learn more!| Rails at Scale
ZJIT has been merged into upstream Ruby. Learn about its architecture!| Rails at Scale
How Sorbet and RBS can work together to elevate your Ruby development experience| Rails at Scale
A quick list of Ruby debugging tips and recommendations from Shopify’s Ruby DX team| Rails at Scale
We prototyped an interprocedural static analysis tool using sparse conditional constant propagation.| Rails at Scale
Can we have a faster FFI for CRuby? Yes.| Rails at Scale
It’s 2025, and this year again, the YJIT team brings you a new version of YJIT that is even faster, more stable, and more memory-efficient.| Rails at Scale
We’re very proud of how well YJIT, the default JIT in CRuby, optimizes Rails apps. We’ve been using small Rails benchmarks for a couple of years. But as YJIT improves we need more data from real world apps to help us understand what will speed up Ruby the most. We turned the Lobsters codebase into a nice new benchmark. So how did we do that?| Rails at Scale
At Shopify, we are constantly improving the performance of Ruby for everyone. Based on analysis of and experiments on one of our largest and highest traffic apps, we found two improvements in Ruby’s garbage collector that significantly improved our garbage collector performance, which in turn reduced our response times by 8%.| Rails at Scale
In this post we look at the impact of a new feature of Ruby 3.4 on Shopify’s monolith.| Rails at Scale
As a core part of the Ruby ecosystem, IRB (Interactive Ruby) is an invaluable tool for developers. With its rapid pace of changes and improvements, staying up-to-date with the latest features can significantly enhance your development workflow. In this post, we’ll cover the significant updates to IRB from the first half of 2024 (between v1.11.0 and v1.14.0), as well as enhancements in the Rails Console.| Rails at Scale
Until recently, Ruby lacked a mechanism for detecting native-level memory leaks from within Ruby and native gems. This meant that it was hard to analyze Ruby applications that suffered from memory leaks, causing them to consume increasing amounts of memory until the system runs out and terminates the application. In this blog post, we’ll be looking at the RUBY_FREE_AT_EXIT feature, which allows memory leak checkers to find memory leaks in Ruby and in native gems.| Rails at Scale
In Shopify we have more than 300,000 tests in our core monolith. These tests cover most of our application code and provide us with a great level of confidence when making changes to our app. But do all tests still perform the duties they were intended to even if some of these tests were added more than 10 years ago? In this article we will explore how Shopify revised all tests to reveal and fix ones that were testing nothing while still being executed.| Rails at Scale
Shopify continues investing in Ruby and Rails to help ensure that they are 100-year tools. Moving them forward and bringing the community with us are a large part of that work, and participating in community events like RubyConf is an important part of that.| Rails at Scale
In September, 2020, our team at Shopify released a Ruby gem named Packwerk, a tool to enforce boundaries and modularize Rails applications. Since its release, Packwerk has taken on a life of its own, inspiring blog posts, conference talks, and even an entire gem ecosystem. Its popularity is an indication that Packwerk clearly filled a void in the Rails community.| Rails at Scale
In this blog post, we will delve into the major enhancements introduced in Ruby 3.3’s IRB, as well as what’s currently planned for the next year.| Rails at Scale
This year, the YJIT team has been working hard to improve and optimize YJIT. We’re proud to say that the version of YJIT to be included with Ruby 3.3 is leaps and bounds ahead of Ruby 3.2’s. It provides better performance across the board, while also warming up faster and using less memory. The 3.3 release is also more robust, including a number of bug fixes along with an improved test suite. In this blog post, we share some early numbers.| Rails at Scale
This year, the YJIT team and I have gotten a paper accepted at MPLR 2023 (Managed Programming Languages and Runtimes), which is now freely available through ACM open access. The paper, titled “Evaluating YJIT’s Performance in a Production Context: A Pragmatic Approach”, goes into details of the strategy taken to evaluate YJIT’s performance in a production context. One of our key findings, when comparing YJIT against other existing Ruby JITs such as JRuby and TruffleRuby, is that YJIT ...| Rails at Scale
Ruby 3.2 saw the introduction of object shapes which speedup instance variables access in most cases, but can be slower in some pathological cases.| Rails at Scale
Over the last year, I’ve been working on a new Ruby application server called Pitchfork. In most regards it’s extremely similar to the venerable Unicorn, from which it originates, but with one major extra feature: Reforking, which reduce memory usage of Ruby applications.| Rails at Scale
One of the places where TruffleRuby is still noticeably slower than CRuby is in finding and loading a lot of files. Do Ruby apps really do this?| Rails at Scale
Ruby 3.2 YJIT has optimized the production workloads of Shopify and other companies. We encourage you to enable YJIT in production. Once Ruby 3.3 is released, it should make your application even faster.| Rails at Scale
YJIT’s ability to improve performance by adapting to run-time behavior can increase the speed of our code in a way that dropping down to C can’t. As such, I think we should reconsider the common wisdom that “rewriting our Ruby in C” is the ideal path to performance optimization and take a serious look at “rewriting our C in Ruby” instead.| Rails at Scale
On the Ruby Developer Experience team here at Shopify, our goal is to deliver a state-of-the-art development experience to Rubyists both at Shopify and in the broader community. This means keeping our tools up-to-date with the most recent versions of Ruby.| Rails at Scale