~/talk

Caching Without Marshal

Talkat RailsConf 2022 · 2022-05-17..05-19· [ruby, ruby-on-rails]
slides:none on file

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

  1. 0:00Introduction
  2. 2:27Rails caching problems
  3. 11:50Marshall like sorcerer's apprentice
  4. 12:55MessagePack alternative
  5. 20:36Migration to MessagePack
  6. 22:01ActiveRecord caching with MessagePack
  7. 25:30Production performance gains
  8. 27:37Edge cases handling
  9. 29:20Removing Marshall from cache
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.