Benchmarking caching in Rails with Redis vs the alternatives - BigBinary Blog

07-Feb-2025 103
Recently, we have seen the rise of Redis alternatives. Some of them claimed substantial performance gains. We did this benchmarking to see how much performance gain one would get by switching from Redis to one of the alternatives. We explored several new contenders like Valkey, DragonflyDB, and DiceDB, which serve as drop-in Redis replacements. We also looked at Rails' own SolidCache, which challenges in-memory storage by favoring database-based approach. For this comparison, we included a tuned SolidCache for PostgreSQL, as suggested by Andrew Atkinson. We also included SolidCache with sqlite3, inspired by Stephen Margheim, who claims to offer significant performance gains. Finally, we added litecache with sqlite3 to compare it directly against SolidCache.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle