Denormalizing Rails
summary
A Rails site migrates heavy joins (five-table query for top fans) into precomputed documents stored in MongoDB, serving presenters that return IDs and counts and fall back to MySQL when missing. The system denormalizes 41 integer metrics per artist across 500,000 artists, populates them up front via background workers fed by an RabbitMQ AMQP stream, and maintains consistency with asynchronous observers (near-second latency). Tests assert silo generation on create/destroy so regeneration and persistence, not fragile frag caching, drive the approach.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 3:58Caching limits for performance
- 7:08Presenters as presentation layer
- 10:18Demo: presenter and silo
- 14:30Cache expiration challenges
- 17:04Asynchronous observers
- 21:14Testing denormalized updates
- 23:45Future plans and feedback
- 35:31Q&A
related talks
29mScaling Rails to 2M MySQL requests per second
20mSafely Decomposing a Highly Available Rails App
29mA Rails Performance Guidebook: from 0 to 1B requests/day
14mDatabase Performance at Scale for RoR Applications
44mMongoDB to MySQL the How and the Why
27mScaling a Rails Monolith w/Event Driven Microservices
28mLightweight Business Intelligence with Ruby, Rails, and MongoDB
25mPowerful Data: Making Rails Apps Faster with Aggregation
