[rabbitmq-discuss] Cluster behavior with distributing messages internally over Wide area networks

Alexandru Scvorţov alexandru at rabbitmq.com
Wed Aug 18 11:32:44 BST 2010


Hi Josh,

> I was wondering whether a Node is aware of what to and what not to deliver to a cluster peer. 
> 
> Eg.
>    
> Producer
>    \/
> [Node 1] ===> consumer1 (queue1)
>    |
>    | WAN 
>    |
> [Node 2] ===> consumer2 (queue2)
> 
> Here all messages to will traverse the WAN connection b/c they are delivered to Queue2.
> 
> If Node 2 would not have a consumer2, would Node 1 send all it's messages, or will it filter messages only to match a queue in Node2?

Messages are only sent across the network when they're requested.  So,
unless something on Node 2 tries to consume messages from queue1, those
messages will not be sent over the network.

> I guess my question is rather related to where a queue is held in memory and how it's accessed, 

A queue is only stored on the node it was declared on.  Within the cluster,
all nodes can access all queues, but messages are only routed to other
nodes on-demand.

> but our concern is what inter-cluster-traffic we have to expect. Since it's a low bandwith/high latency connection we're not sure whether Clustering or Shovel is more adequate?

It depends on what you're trying to achieve.  Clustering creates a
logical broker made out of several smaller ones.  The shovel keeps the
brokers separate.

If you want to connect to any of the nodes and be able to consume from
any queue, create new bindings, and so on, use clustering.

If you just want to move messages around in a predefined way, use
shovel.

Cheers,
Alex



More information about the rabbitmq-discuss mailing list