High performance APIs in Ruby using ActiveRecord and Goliath
summary
Claims a Ruby API is reimplemented to hit roughly 1000X throughput and cut 90th percentile latency under 200ms by replacing threaded Rails with an evented stack using EventMachine, Synchrony, and Goliath. The system shards processes per core, proxies connections, and falls back to per-pool overflow numbers when shards lag. Benchmarks show up to ~2,000 rps with medians around 100ms. Tools include ActiveRecord reuse, careful dependency trimming, a small exception proxy, and parallel scatter/gather across shards.
AI-written summary · about
chapters (7)
- 0:00Start
- 2:40The Requirements
- 4:44Reactor Pattern
- 22:14Sandi Metz's Rules
- 23:20Singletons
- 23:51Modified Singleton
- 29:48Call to Action
related talks
38mHigh Concurrent Ruby Web Development Without Fear
01h 03mRuby at Scale
42m3x Rails: Tuning the Framework Internals
20mSafely Decomposing a Highly Available Rails App
30mScaling Rails with JRuby in 2022
14mDatabase Performance at Scale for RoR Applications
01h 15mSpeedupRails, Speedup Your Code
44mWriting fast Ruby
