[rabbitmq-discuss] Federation link and partition handling
Simon MacMullen
simon at rabbitmq.com
Thu May 8 11:13:48 BST 2014
On 23/04/14 23:35, lepolac wrote:
> When there's a partition on a cluster that's configured in ignore or
> autoheal, where both sides will stay active, a second federation link seems
> to be created.
Yes, that's correct.
It's hard to see how it could be otherwise - while the partition is
ongoing, both halves of the cluster think that the other half is down,
and that they need to keep things going. So the half that didn't have
the federation link when the partition happened will start up a new one.
> Are both links active ? Will the downstream broker get messages from both
> partitions ? How will they be merged back ?
This is really more of a question about what happens to state in
partitions; the federation link can just be thought of as a stateful
thing that is involved in the partition.
So:
> Are both links active ?
While the partition is ongoing. Afterwards it depends on the partition
handling mode - see below.
> Will the downstream broker get messages from both partitions ?
Well, federation links retrieve messages from the upstream; so we are
talking about the downstream partitioning. Both halves of the downstream
will retrieve messages from the same upstream (if the upstream is also a
cluster they may decide to connect to different nodes of course). Since
both halves of the downstream partition will have the same cluster-id,
they will end up sharing the message stream from the upstream in a
round-robin-ish way.
> How will they be merged back ?
After the partition heals (at the network level) it depends whether the
partition handling mode is "ignore" or "autoheal. In "ignore" mode both
links will continue to be active and publishing into their respective
halves of the cluster. In "autoheal" mode enough nodes will be restarted
that the partition will heal - and the excess links will get shut down.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, Pivotal
More information about the rabbitmq-discuss
mailing list