Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to automatically find defects in cluster commands by Redis

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report