How to automatically find defects in cluster commands by Redis
Many novices are not very clear about how Redis automatically discovers the defects of cluster commands. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
Differences between redis 3.0.3 and 4.0.2 when using cluster slots commands: version 3.0.3 returns (regardless of whether bind ip): 7001 > cluster slots1) 1) (integer) 0 2) (integer) 4095 3) 1) "127.0.0.1" 2) (integer) 7000 4) 1) "127.0.0.1" 2) (integer) 70042) 1) (integer) 12288 2) (integer) 16383 3) 1) "127.0.0.1" 2) (integer) 7003 4) 1) "127.0.0.1" 2) (integer) 70073) 1) (integer) 4096 2) (integer) 8191 3) 1) "127.0.0.1" 2) (integer) 7001 4) 1) (integer) 70054) 1) (integer) 8192 2) (integer) 12287 3) 1) "127.0.0.1" 2) (integer) 7002 4) 1) (integer) 70064.0.2 version returns (when bind ip) 192.168.1.1327000 > cluster slots1) 1) (integer) 10923 2) (integer) 16383 3) 1) "192" .168.1.132 "2) (integer) 7005 3)" 3e20546717c40b5d8513601d05fd924ce38c07ce "4) 1)" 192.168.1.132 "2) (integer) 7002 3)" eec0d41ed22c527fae7b1e1179ffa18a55c7ecc1 "2) (integer) 5572 2) (integer) 10922 3) 1)" 192.168.1.132 "2) (integer) 7001 3)" 22e2357417c90689966f66c813c8141591087b1a "4) 1)" 192.168.1 " .132 "2) (integer) 7004 3)" 49ee26df943831f9e0ad4d67fd7a7c7472c9876c "3) 1) (integer) 0 2) (integer) 5571 3) 1)" 192.168.1.132 "2) (integer) 7003 3)" cc8c6fde5bd9a80a1aefb71dc6bae4bf9a119cac "4) 1)" 127.0.0.1 "2) (integer) 7000 3)" 6cf873bc9f7c3efcfd8f9110d8fc1c2285bb423f "
If not bind ip, 127.0.0.1 is returned by default
Working with scen
The Jedis client uses this command to do cluster discovery. Therefore, it is recommended that when using:
Upgrade redis version to 4.0.2 or above (other versions need to be tested)
Bind private network ip
Enable password
Common command # set password config set masterauth "123456" config set requirepass "123456" auth "123456" config rewrite # client. / redis-cli-h 192.168.1.132-p 7000-a 123456 is it helpful for you to read the above? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.