Marshal is Ruby's ultimate sharp knife, able to transform any object into a binary blob and back. This makes it a natural match for the diverse needs of a cache. But Marshal's magic comes with risks. Code changes can break deploys; user input can trigger an RCE. We recently decided these risks were not worth it. Breaking with convention, we migrated the cache on our core monolith to MessagePack, a more compact binary serialization format with stricter typing and less magic. In this talk, I'll pry Marshal open to show how it works, how we replaced it, and why you might want to do the same.
Get notified about new features and conference additions.