O'Reilly logo

RabbitMQ Cookbook by Sigismondo Boschi, Gabriele Santomaggio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required