Cluster solution to replicate RabbitMQ configuration across data centers

314 views
Skip to first unread message

Vaibhaw Pandey

unread,
Mar 2, 2017, 7:31:24 AM3/2/17
to rabbitmq-users
Hello,

I am new to RabittMQ and trying to solve a problem in the existing infrastructure at work. Our requirement is to deploy a cluster to ensure high availability of channels and configuration across data centers. The RabbitMQ Cluster would have been perfect for us but for the strong recommendations against deploying it across WANs. Our requirement is slightly different from what I came across in the documentation and reading through posts online is that for us, having a backup channel (preferably passive) with all the configuration information replicated (vhosts, queues, users, exchanges etc.) is of primary importance - we are ok to drop messages in case a node fails as long as further communication can continue on the other nodes.

Federation and Shovel seem to be logical solutions for replication messages across DCs while HA and HA pacemaker are solving a different problem. What we need is a simple HA solution for communication so that, say, if a data center goes down, we could continue with another node(s) in another data center. That is:
  • Monitor the nodes to detect when one fails
  • Move over to the one of the failover nodes.

I don't think this would be such an absurd use case that it isn't supported at all. Any ideas or pointers will be highly appreciated! :)

A work on our current config: We have thousands of servers across (AWS) data centers in the world that currently communicate to a single RabbitMQ node. The servers aren't very chatty but we are concerned about a single point of failure in case things go wrong. Our current scheme of fixing things is to manually detect the the RabbitMQ node has gone down and recreate it using the configuration information (vhost, users, etc) we store (and keep current) elsewhere. The servers are already configured to take a list of RabbitMQ servers to attempt to connect to.

Thanks in advance!

Regards,
Vaibhaw

Michael Klishin

unread,
Mar 2, 2017, 8:03:47 AM3/2/17
to rabbitm...@googlegroups.com
Channels are inherently transient. You can't replicate them,
they are tied to their connections which cannot be replicated either.

As for configuration, see Definition Export and Import on http://rabbitmq.com/management.html.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vaibhaw Pandey

unread,
Mar 2, 2017, 10:49:25 AM3/2/17
to rabbitm...@googlegroups.com
Thanks for replying Michael! :)

Had some followup questions.


> As for configuration, see Definition Export and Import on http://rabbitmq.com/management.html.
So I could write some sort of tool to keep polling the primary RabbitMQ to check if it is alive and sync the configuration (to somewhere)? On detecting a failure, I could load the configuration into a new node and bring it up? Do that sound like a decent plan?

Thanks again!
Vaibhaw

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/yMvIeqPoS48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

Michael Klishin

unread,
Mar 2, 2017, 11:20:18 AM3/2/17
to rabbitm...@googlegroups.com
It sounds OK. You can also back up and version the definitions easily since they are just JSON documents.

The hard part with this is detecting when a cluster/node really is unavailable and it's time to switch all apps to the backup one.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

Vaibhaw Pandey

unread,
Mar 6, 2017, 11:04:09 AM3/6/17
to rabbitm...@googlegroups.com
Michael,

Sorry to raise this again. I have been looking the RabbitMQ clustering options. I can't really get my head around why standard RabbitMQ clustering across multiple AWS data centers isn't right for our scenario?

To remind, we were looking for a configuration (exchanges, queues, vhosts, users etc) replication and HA solution - we don't mind losing the messages in those queues in the event of a failure.

The default value 'net_ticktime' is 60 seconds: the usual latency between AWS DCs is usually in msecs. Even if disconnections do happen, we don't care about messages too much as long as we can deal with partitions gracefully. And setting up the recovery mode to pause-minority seems to be fairly decent (as long as the corner cases are thought through).

Am I missing something really obvious?

Thanks,
Vaibhaw


To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/yMvIeqPoS48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/yMvIeqPoS48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages