Optimizing mirror policies

In the Mirroring queues recipe, we have seen how to mirror a queue across all the nodes in the cluster. Replicating messages on more than two nodes improves the system availability minimally, but if the cluster grows because of the higher load, it will negatively impact the application's performance. In this recipe we'll show you how to distribute each queue to a pair of nodes, in order to have two copies for each queue as follows:

Optimizing mirror policies

In this way, each queue has one master and one slave.

Getting ready

You need a RabbitMQ cluster with mirror policies (refer to the Mirroring queues recipe).

How to do it…

In this recipe we have used ...

Get RabbitMQ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.