Creating cluster Connecting to node 127.0.0.1:7000: OK Connecting to node 127.0.0.1:7001: OK Connecting to node 127.0.0.1:7002: OK Connecting to node 127.0.0.1:7003: OK Connecting to node 127.0.0.1:7004: OK Connecting to node 127.0.0.1:7005: OK >>> Performing hash slots allocation on 6 nodes... Using 3 masters: 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7000 replica #1 is 127.0.0.1:7003 127.0.0.1:7001 replica #1 is 127.0.0.1:7004 127.0.0.1:7002 replica #1 is 127.0.0.1:7005 M: 9991306f0e50640a5684f1958fd754b38fa034c9 127.0.0.1:7000 slots:0-5460 (5461 slots) master M: e68e52cee0550f558b03b342f2f0354d2b8a083b 127.0.0.1:7001 slots:5461-10921 (5461 slots) master M: 393c6df5eb4b4cec323f0e4ca961c8b256e3460a 127.0.0.1:7002 slots:10922-16383 (5462 slots) master S: 48b728dbcedff6bf056231eb44990b7d1c35c3e0 127.0.0.1:7003 S: 345ede084ac784a5c030a0387f8aaa9edfc59af3 127.0.0.1:7004 S: 3375be2ccc321932e8853234ffa87ee9fde973ff 127.0.0.1:7005 Can I set the above configuration? (type'yes' to accept): yes
Nodes configuration updated >>> Sending CLUSTER MEET messages to join the cluster Waiting for the cluster to join... >>> Performing Cluster Check (using node 127.0.0.1:7000) M: ebbb890e899244e4a2a6303826a29543ebf9885d 127.0.0.1:7000 slots:0-5460 (5461 slots) master M: ebbb890e899244e4a2a6303826a29543ebf9885d 127.0.0.1:7001 slots:5461-10922 (5462 slots) master M: 73c22198cd1d0782ec24e3c9b03378030891c9a3 127.0.0.1:7002 slots:10923-16383 (5461 slots) master M: c785d85b95d7bdc28ec90384ab8a5885b289542c 127.0.0.1:7003 slots: (0 slots) master replicates b949ea2d9c822ff069521a354b4ed48855ac6203 M: 570c472fe553ba3c9d0fb3ba16fcdb8579b4fc86 127.0.0.1:7004 slots: (0 slots) master replicates ebbb890e899244e4a2a6303826a29543ebf9885d M: f86667ec42cff41a5666162a912713173f5306d7 127.0.0.1:7005 slots: (0 slots) master replicates 73c22198cd1d0782ec24e3c9b03378030891c9a3 [OK] All nodes agree about slots configuration. >>> Check for open slots... >>> Check slots coverage... [OK] All 16384 slots covered.
$ redis-cli -c -p 7000 redis 127.0.0.1:7000> set foo bar -> Redirected to slot [12182] located at 127.0.0.1:7002 OK redis 127.0.0.1:7002> set hello world -> Redirected to slot [866] located at 127.0.0.1:7000 OK redis 127.0.0.1:7000> get foo -> Redirected to slot [12182] located at 127.0.0.1:7002 "bar" redis 127.0.0.1:7000> get hello -> Redirected to slot [866] located at 127.0.0.1:7000 "world"