0

Suppose In any data centre there are different network partition(for eg. DMZ zone) and thus some sets of hosts cant contact other sets of hosts. So if I want to propagate a message to all hosts in any datacenter, can gossip/consul work for the use case?

For the above problem, one solution I am thinking is: All hosts in DMZ zones can be allowed to connect to consul servers(few hosts only). It will be like some sets of hosts cant contact to other sets of hosts, but all the host in the datacenter can talk to consul servers. But I am not sure, even by this, any message can be propagated to all the hosts in the datacenter.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
Harsh Sharma
  • 10,942
  • 2
  • 18
  • 29

1 Answers1

0

Gossip is just used for consul, which in turn is just used for service registration, service discovery and key/value data - related to configuration.

The Event mechanism is probably what you want, from the Python docs:

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.