Closed ksol closed 10 years ago
@ksol I see why you need slaves
method, but is all_clients
necessary?
I'm not convinced by the name, but yes I think it is necessary. I want to read from all redis instances, regardless of wether they're master or slave.
Context: I'm developing an application which reads (never writes) from a redis database. This database has a master and two slaves, and three sentinels to monitor the whole thing. I'm already using this gem to handle failovers, but since we're only reading, I'd like to be able to read from the slaves as well. It does not matter if the masters and the slaves are a bit out of sync in my case.
So I added two methods,
Redis#slaves
andRedis#all_clients
, with the first one returning only the slaves clients, and the second one returning the slaves + the master clients.Please let me know if there is anything on your mind regarding this feature, thanks!