Skip to content

Commit ab2b972

Browse files
Updated cluster documentation
1 parent 27797a5 commit ab2b972

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cluster.markdown

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $obj_cluster = new RedisCluster('mycluster');
3333
On construction, the RedisCluster class will iterate over the provided seed nodes until it can attain a connection to the cluster and run CLUSTER SLOTS to map every node in the cluster locally. Once the keyspace is mapped, RedisCluster will only connect to nodes when it needs to (e.g. you're getting a key that we believe is on that node.)
3434

3535
## Keyspace map
36-
As previously described, RedisCluster makes an initial mapping of every master (and any slaves) on initial construction, which it uses to determine which nodes to direct a given command. However, one of the core functionalities of Redis cluster is that this keyspace can change while the cluster is running.
36+
As previously described, RedisCluster makes an initial mapping of every master (and any slaves) on construction, which it uses to determine which nodes to direct a given command. However, one of the core functionalities of Redis cluster is that this keyspace can change while the cluster is running.
3737

3838
Because of this, the RedisCluster class will update it's keyspace mapping whenever it receives a MOVED error when requesting data. In the case that we receive ASK redirection, it follows the Redis specification and requests the key from the ASK node, prefixed with an ASKING command.
3939

@@ -48,7 +48,9 @@ $obj_cluster->setOption(RedisCluster::OPT_FAILOVER, RedisCluster::FAILOVER_NONE)
4848
$obj_cluster->setOption(RedisCluster::OPT_FAILOVER, RedisCluster::FAILOVER_ERROR);
4949

5050
// Always distribute readonly commands between masters and slaves, at random
51-
$obj_cluster->setOption(RedisCluster::OPT_FAILOVER, RedsiCluster::FAILOVER_DISTRIBUTE);
51+
$obj_cluster->setOption(
52+
RedisCluster::OPT_FAILOVER, RedsiCluster::FAILOVER_DISTRIBUTE
53+
);
5254
</pre>
5355

5456
## Main command loop

0 commit comments

Comments
 (0)