Caching Without Marshal
summary
Migrates Rails cache off Marshal to MessagePack and shows concrete results: builds a MessagePack-based serializer with 128 extension slot strategy, an ActiveRecord coder that preserves loaded associations and handles circular references, and a fallback object protocol for custom types. Records shrink from ~1600–4000 bytes down to ~300 bytes (≈13x improvement), memcache fill percent drops, and a six-month dual-write rollout finishes with Marshal fully removed. Uses MessagePack Ruby, Snappy compression, and the paquito gem.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 2:27Rails caching problems
- 11:50Marshall like sorcerer's apprentice
- 12:55MessagePack alternative
- 20:36Migration to MessagePack
- 22:01ActiveRecord caching with MessagePack
- 25:30Production performance gains
- 27:37Edge cases handling
- 29:20Removing Marshall from cache
related talks
10mHigh Perfmance Caching with Rails
33mWhat the Cache?!
37mCache is King: Get the Most Bang for Your Buck From Ruby
33mCache is King: Get the Most Bang for Your Buck From Ruby
31mSolid Cache: A disk backed Rails cache
01h 15mSpeedupRails, Speedup Your Code
45mClosing Keynote: Analyzing and Reducing Ruby Memory Usage
54mKeynote: Exploring Memory in Ruby - Building a Compacting GC
