Redis cluster proxy 解决方法

网友投稿 461 2022-11-25

Redis cluster proxy 解决方法

Redis Cluster and Docker

Currently Redis Cluster does not support NATted environments and in general environments where IP addresses or TCP ports are remapped.

Docker uses a technique called port mapping: programs running inside Docker containers may be exposed with a different port compared to the one the program believes to be using. This is useful in order to run multiple containers using the same ports, at the same time, in the same server.

In order to make Docker compatible with Redis Cluster you need to use the host networking mode of Docker. Please check the --net=host option in the Docker documentation for more information.

Redis 集群不支持nat转换的ip访问

其实可以这样处理

第一步:使用nat创建集群

第二步:停止redis cluster

第三步:修改每个节点的 node.conf  里面myself地址为nat地址

Redis cluster偏移量10000的解决方式

修改cluster.h里面的#define CLUSTER_PORT_INCR 10000

#define CLUSTER_PORT_INCR xxxx你想偏移多少偏移多少

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:一分四串口UART扩展芯片的特性
下一篇:详解Mybatis
相关文章

 发表评论

暂时没有评论,来抢沙发吧~