We have a Ruby on Rails app on Heroku that's using Redis for several independent functions -- e.g. caching various things via redis-store, hosting Resque queues, and temporary data storage. We're scaling up rapidly, and recently switched from RedisToGo to our own EC2-hosted instance. But our memory and connection usage is still growing. Is it possible for the Rails app to establish connections with different Redis instances for different purposes?
Yes, it is.
This depends somewhat on how you're connecting to (and using) redis. But there's nothing stopping any Rails application from opening as many connections to as many redis servers as you like. If you're going to be connecting from multiple servers to one redis instance, I would encourage you to check out the connection_pool gem -- it'll help synchronize all of your threads and prevent you from overwhelming the server with clients.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With