Sean Feldman
Sean Feldman

Reputation: 25992

Losing mirrored queues

RabbitMQ cluster of 3 nodes that has mirror-all HA policies defined. Cluster has faulted and partitioned into independent nodes. Cluster was repaired, and as a result of failure some of the queues were lost. Is this a possible scenario even though HA policy to mirror all queues is in place?

Upvotes: 1

Views: 1346

Answers (1)

Balint Pato
Balint Pato

Reputation: 1549

In short yes, but it would be nice to understand your exact case.

From https://www.rabbitmq.com/partitions.html

During a network partition

While a network partition is in place, the two (or more!) sides of the cluster can evolve independently, with both sides thinking the other has crashed. Queues, bindings, exchanges can be created or deleted separately. Mirrored queues which are split across the partition will end up with one master on each side of the partition, again with both sides acting independently.

Some example scenarios:

If queues were created during the network partition, when the cluster is repaired, there is no guarantee that they will be kept. The losing partition will discard its state and restore it from the winning partition.

If you restarted ram nodes, which had the only copy of your queue definitions, then they will be lost. The rabbitmq documentation recommends using no ram nodes for this reason.

I highly recommend the rabbitmq documentation, it's pretty extensive and very precise.

Upvotes: 4

Related Questions