使用内部IP地址创建Redis群集。
M: 24ff344338e4abb4f7f2e888ee9d57843fc46e62 10.0.9.19:6379
slots:5461-10922 (5462 slots) master
1 additional replica(s)
S: 9aa005c2d914db12a394af0cb8a0d8e218730099 10.0.9.15:6379
slots: (0 slots) slave
replicates f67bbf56d98c2bff9eba343356e2b52bd5e59b12
S: aedd33304e59cbe7091fb36befdb230f3956f03e 10.0.9.16:6379
slots: (0 slots) slave
replicates 9cd64e70f9fd7fffb44b79186e09e3872ea3ebb4
M: f67bbf56d98c2bff9eba343356e2b52bd5e59b12 10.0.9.20:6379
slots:10923-16383 (5461 slots) master
1 additional replica(s)
S: 2af640e7072b255786b47337e7ca171e0506f5f9 10.0.9.14:6379
slots: (0 slots) slave
replicates 24ff344338e4abb4f7f2e888ee9d57843fc46e62
M: 9cd64e70f9fd7fffb44b79186e09e3872ea3ebb4 10.0.9.18:6379
slots:0-5460 (5461 slots) master
1 additional replica(s)
外部连接只有一个公共IP,54.174.xxx.xxx。
连接到群集后,重定向存在问题。
52.71.xxx.xxx:6379> lrange mylist 0 -1
-> Redirected to slot [5282] located at 10.0.9.18:6379
Could not connect to Redis at 10.0.9.18:6379: Connection timed out
Could not connect to Redis at 10.0.9.18:6379: Connection timed out
(254.54s)
not connected>
看起来redis要求客户端连接到另一个节点以获取数据。是否可以让当前连接的节点获取数据?或任何其他解决方案?
至少,我知道Cassandra会从另一个节点获取数据而不是重定向。