美文网首页
REDIS----配置文件----CLUSTER DOCKER/

REDIS----配置文件----CLUSTER DOCKER/

作者: JuMinggniMuJ | 来源:发表于2020-06-01 21:31 被阅读0次

    CLUSTER DOCKER/NAT support部分:

    1.redis关于docker容器的设置:
    # In certain deployments, Redis Cluster nodes address discovery fails, because
    # addresses are NAT-ted or because ports are forwarded (the typical case is
    # Docker and other containers).
    #
    # In order to make Redis Cluster working in such environments, a static
    # configuration where each node knows its public address is needed. The
    # following two options are used for this scope, and are:
    #
    # * cluster-announce-ip
    # * cluster-announce-port
    # * cluster-announce-bus-port
    #
    # Each instruct the node about its address, client port, and cluster message
    # bus port. The information is then published in the header of the bus packets
    # so that other nodes will be able to correctly map the address of the node
    # publishing the information.
    #
    # If the above options are not used, the normal Redis Cluster auto-detection
    # will be used instead.
    #
    # Note that when remapped, the bus port may not be at the fixed offset of
    # clients port + 10000, so you can specify any port and bus-port depending
    # on how they get remapped. If the bus-port is not set, a fixed offset of
    # 10000 will be used as usually.
    #
    # Example:
    #
    # cluster-announce-ip 10.1.1.5
    # cluster-announce-port 6379
    # cluster-announce-bus-port 6380
    

    在某些部署中,Redis集群节点地址发现失败,因为地址是NAT-ted或端口是转发的(典型的情况是Docker和其他容器),为了使Redis集群在这样的环境中工作,需要一个静态配置,其中每个节点都知道其公共地址。以下两个选项用于此作用域,分别是:
    集群公告ip
    群集公告端口
    集群通告总线端口
    每个节点都指示其地址、客户端端口和群集消息总线端口。然后,信息被发布在总线数据包的报头中,以便其他节点能够正确地映射发布信息的节点的地址。如果不使用上述选项,将使用普通的Redis集群自动检测。请注意,重新映射时,总线端口可能不在客户端端口+10000的固定偏移量处,因此可以根据重新映射的方式指定任何端口和总线端口。如果未设置总线端口,则通常使用10000的固定偏移量。

    相关文章

      网友评论

          本文标题:REDIS----配置文件----CLUSTER DOCKER/

          本文链接:https://www.haomeiwen.com/subject/zrrezhtx.html