diff options
author | Barbery <380032007@qq.com> | 2017-03-21 13:23:27 +0300 |
---|---|---|
committer | Michael Grunder <michael.grunder@gmail.com> | 2018-02-11 22:24:56 +0300 |
commit | 919b1d19e99ada78791b64d212de96e9337d7d7d (patch) | |
tree | 4333176c0369dc75bfa57ab314949dee8621646d /cluster.markdown | |
parent | 5b29036e65a57278ca5132a3ff7ba259ee66f9a6 (diff) |
Update cluster.markdown
add RedisCluster::FAILOVER_DISTRIBUTE_SLAVES option
Diffstat (limited to 'cluster.markdown')
-rw-r--r-- | cluster.markdown | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cluster.markdown b/cluster.markdown index 0a8ae1a1..52591d8f 100644 --- a/cluster.markdown +++ b/cluster.markdown @@ -65,6 +65,11 @@ $obj_cluster->setOption(RedisCluster::OPT_SLAVE_FAILOVER, RedisCluster::FAILOVER $obj_cluster->setOption( RedisCluster::OPT_SLAVE_FAILOVER, RedisCluster::FAILOVER_DISTRIBUTE ); + +// Always distribute readonly commands to the slaves, at random +$obj_cluster->setOption( + RedisCluster::OPT_SLAVE_FAILOVER, RedisCluster::FAILOVER_DISTRIBUTE_SLAVES +); </pre> ## Main command loop |