This topic created in 1833 days ago, the information mentioned may be changed or developed.
集群创建时:redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 --cluster-replicas 1
每个 redis 节点配置文件中 bind 0.0.0.0
此时我通过公网 ip 连接上 redis 某个节点,指令重定向的时候会出现 located at 127.0.0.1:7006,导致直接连接失败,此时正常来说应该重定向到 公网 ip:port 而不是 localhost:port
请教一下应该怎么解决这个问题,ps: 将来可能会将服务器打到虚拟网段中,此时重定向时需要支持 vpn_ip:port,公网 ip:port
Supplement 1 Apr 20, 2021 本来想用 域名 创建 集群,这样 client 端就可以通过自己的域名解析访问 redis 重定向后的 其他节点。
但是看了 redis 的 issue,这个问题,从 15 年就有人提到现在也没有进行解决,可能是为了安全考虑才不做支持吧。
现在只能想办法把 server 端的 重定向转到 client 端来做
2 replies 2021-04-20 09:36:34 +08:00  | | 1 ccde8259 Apr 19, 2021 via iPhone # cluster-announce-ip 10.1.1.5 # cluster-announce-port 6379 # cluster-announce-bus-port 6380 |