Rails 7.2 and YJIT on Heroku - Ryan Wood

24-Jan-2025 106
This all started as we attempted to upgrade MoonClerk to Rails 7.2. According to the Rails 7.2 docs, if you are running Ruby 3.3+, which we were, YJIT will be enabled by default. This claims to provide “15-25% latency improvements.” Who doesn’t want a faster server? 👋 The question becomes “at what cost?” There is always a cost. In this case, it’s increased memory usage. That can be a problem for those on Heroku in a memory-constrained environment. The Upgrade to Rails 7.2 Let’s start with the current Heroku configuration that we are using. MoonClerk runs on ~4 2x Heroku Dynos. Each dyno runs 2 Puma workers and each of those runs 5 threads. .
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle