JRuby on Rails: From Zero to Scale
summary
JRuby runs Rails on the JVM with no global interpreter lock, JVM tooling and Java libraries for gaps, and migration helpers like JRuby-lint and ActiveRecordJDBC. Benchmarks show real wins: a large site drops from 40 to 10 machines (≈75% cost reduction) while improving throughput, and JRuby uses roughly half the memory versus 20 CRuby workers. Startup/warmup is slower today but improving via OpenJ9, class data sharing and GraalVM AOT experiments.
AI-written summary · about
chapters (36)
- 0:00JRuby on Rails: From Zero to Scale
- 1:55Ruby Implementation First!
- 2:22JVM Tools and GC
- 3:03Roadmap
- 3:22Skip 2.6 Support?
- 4:20JRuby Install
- 4:57Test it out!
- 5:25Why Is This Hard?
- 6:32Running in Same JVM
- 6:58JRuby Flag: --dev
- 7:38OpenJDK Class Data Sharing
- 8:53Best Times
- 9:09Future: Ahead-of-time Compile
- 10:49Getting Help
- 11:25Why JRuby on Rails?
- 12:30Minimal Config Diffs
- 14:33Active RecordJDBC 52.2
- 16:32Use-Case: Discourse
- 18:45Strategy: Ignore?
- 18:57Strategy: Replace with Pure Ruby
- 19:11Strategy: FFI - Foreign Function Interface
- 19:55Strategy: Script Java Library
- 21:04Strategy: Native Java Extension
- 21:23Porting oj
- 22:09Porting Gems Conclusion
- 22:43Running JRuby on Rails
- 23:34Scaling Rails
- 25:04One User's Story
- 26:05Optimizing for Rails
- 26:47Baseline Rails App
- 28:02Caveats
- 33:25Memory Usage
- 34:26Scaling Takeaways
- 35:48JRuby Futures
- 36:39JRuby on Rails Futures
- 38:09Help Wanted!
related talks
41mJRuby: Zero to Scale! 🔥
30mScaling Rails with JRuby in 2022
31mExpand your Ruby Potential with JRuby
30mUsing JRuby: What, When, How, and Why
23mWhat the hell is a JRuby?
55mJRuby in 2018: Building, Deploying, and Scaling Your Apps
29mScaling Ruby with JRuby
28mDeploy, Scale and Sleep at Night with JRuby
