flyerhzm / redis-sentinel

another redis automatic master/slave failover solution for ruby by using built-in redis sentinel (deprecated)
MIT License
189 stars 67 forks source link

Round robin to redis slaves #54

Open givan opened 9 years ago

givan commented 9 years ago

We're using the redis sentinel to connect to our Redis cluster. We want to use node sentinel to connect to slave machines as:

           options =
                    no_ready_check: true
                    socket_keepalive: true
                    retry_max_delay: 3000
                    connect_timeout: 1000
                    max_attempts: 5
                    role: 'slave'
            redisClient = sentinel.createClient(sentinelConfigs, masterName, options)

Would that result in choosing a redis slave based on round robin fashion every time we call createClient(), or will always pick up the same redis slave in the cluster?

givan commented 9 years ago

I know this client for Ruby, but wanted to see if people had any experience with getting random connection to a redis slave using redis sentinel.