【问题标题】:Consul connectivity in network partition(DMZ zone)网络分区中的 Consul 连接(DMZ 区域)
【发布时间】:2018-10-01 01:13:18
【问题描述】:

假设在任何数据中心都有不同的网络分区(例如 DMZ 区域),因此某些主机集无法联系其他主机集。因此,如果我想将消息传播到任何数据中心的所有主机,gossip/consul 是否适用于该用例?

对于上述问题,我想到的一种解决方案是:允许 DMZ 区域中的所有主机连接到领事服务器(仅限少数主机)。这就像一些主机集无法与其他主机集联系,但数据中心中的所有主机都可以与领事服务器通信。但我不确定,即使这样,任何消息都可以传播到数据中心的所有主机。

【问题讨论】:

    标签: consul gossip


    【解决方案1】:

    Gossip 仅用于 consul,而 consul 又仅用于服务注册、服务发现和键/值数据 - 与配置相关

    Event 机制可能是您想要的,来自 Python 文档:

    Event = <class 'consul.base.Consul.Event'>
    
    The event command provides a mechanism to fire a custom user event to
    an entire datacenter. These events are opaque to Consul, but they can
    be used to build scripting infrastructure to do automated deploys,
    restart services, or perform any other orchestration action.
    
    Unlike most Consul data, which is replicated using consensus, event
    data is purely peer-to-peer over gossip.
    
    This means it is not persisted and does not have a total ordering. In
    practice, this means you cannot rely on the order of message delivery.
    An advantage however is that events can still be used even in the 
    absence of server nodes or during an outage.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-11
      • 2019-08-03
      • 1970-01-01
      • 2018-09-03
      • 1970-01-01
      相关资源
      最近更新 更多