Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
A disk cache can hold much more data than a memory one. But is it fast enough? At @37signals they built Solid Cache, a database backed ActiveSupport cache, to test this out. Running in production on hey.com, they now cache months' rather than days' of data. The result: emails are 40% faster to display and it costs less to run. Links: https://rubyonrails.org/ https://github.com/rails/solid_cache https://dev.37signals.com/solid-cache/ #RailsWorld #RubyonRails #SolidCache #database #ActiveSupport
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In this presentation, Donal McBreen, a programmer at 37signals, discusses Solid Cache, a new disk-backed caching system designed for Ruby on Rails applications. Solid Cache aims to address the inefficiencies associated with traditional memory-based caching systems like Redis or Memcached, which, while fast, have limitations in scalability and cost. The project was implemented on the hey.com and Basecamp platforms, transitioning from a Redis cache to a system that can handle months of data storage instead of just days. Key points covered in the video include: - **Project Motivation**: The central question is whether disk caching can match the performance of memory caching while offering increased storage and reduced costs. - **Caching Strategy**: Solid Cache is classified as a remote disk cache, filling a gap in Rails' caching options. The approach began with the choice to utilize a database, facilitating implementation through existing libraries and SQL capabilities. - **Design Criteria**: Goals included making the cache database-agnostic, simple to install, avoiding scheduled tasks for data management, and optimizing performance. - **Handling Expiry**: McBreen explains the challenge of managing cache expiry. Traditional memory caches automatically delete old data, but disk caches require a more manual method. Strategies were proposed for expiry based on the age of items and the overall size of the cache. - **Expiry Algorithms**: The presentation discusses various strategies for expiry, focusing on FIFO (First-In-First-Out) versus LRU (Least Recently Used) methodologies. FIFO was chosen for its cost efficiency and lower overhead, allowing for effective management of cache size over time. - **Performance Results**: Following implementation, Solid Cache yielded significant improvements: - Reads averaged around 1 millisecond and writes about 1.4 milliseconds. - The setup reduced the required RAM from 1.1 terabytes with Redis to just 80 gigabytes, leading to substantial cost savings. - The miss rate improved from 10% with Redis to about 7.5% with Solid Cache, enhancing efficiency. - **Conclusions and Future Scope**: McBreen concludes that Solid Cache has proven effective in enhancing application speeds and reducing costs. While its benefits may vary for applications not optimized for caching, the overall efficiency gains and operational improvements make it a valuable tool for Rails developers. Through Solid Cache, 37signals demonstrates that a thoughtful approach to caching can yield significant performance enhancements and cost reductions in software applications.
Suggest modifications
Cancel