Benchmarking caching in Rails with Redis vs the alternatives - BigBinary Blog
05-Feb-2025 105
Benchmarking caching in Rails including Redis, Memcached, Valkey, DragonflyDB, SolidCache with PostgreSQL, SolidCache with SQLite3, and LiteCache with SQLite3.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.
Benchmarking caching in Rails with Redis vs the alternatives - BigBinary Blog #ruby #rubydeveloper #rubyonrails #Benchmarking #caching #Rails #Redis #alternatives #BigBinary #benchmarking #bigbinary #blog #redis https://rubyonrails.ba/link/benchmarking-caching-in-rails-with-redis-vs-the-alternatives-bigbinary-blog