[rabbitmq-discuss] Adding new nodes to a cluster

Sammy Yu temijun at gmail.com
Mon Oct 5 18:21:25 BST 2009


Hi Matthew,
   Thanks for the detailed explanation, it really clarifies things.
Is there an easy way to determine whether a node is running under ram
or disk mode?

Best,
Sammy

On Mon, Oct 5, 2009 at 9:21 AM, Matthew Sackman <matthew at lshift.net> wrote:
> Hi Sammy,
>
> On Fri, Oct 02, 2009 at 12:56:21PM -0700, Sammy Yu wrote:
>>    I've getting my rabbitmq cluster setup.  I noticed in the
>> documentation there was reference to two different kinds of nodes, a
>> ram and disk node and it seems to infer that there can only be one ram
>> node and N disk nodes.  My understanding is that the ram node has no
>> persistent information about the other nodes whereas the disk node
>> does.  What's the reasoning behind the constraint and why is it it
>> necessary to have a ram node (I'm assuming there are some performance
>> implications)?
>
> You can have as many RAM nodes and you'd like and as many disk nodes as
> you'd like. In some versions of Rabbit, we've tried to enforce that you
> can't create a cluster only of RAM nodes, but in truth this is
> impossible to achieve so we've actually dropped all attempts to enforce
> this in v1.7.
>
> RAM nodes can go faster because their mnesia tables are only in memory,
> thus they do not have to wait for disks. However, although persistent
> messages will still be sent to disk on a RAM node, routing tables,
> and accountancy information for exchanges and queues is not held on
> disk. As such, should you create a cluster only of RAM nodes, durable
> queues and exchanges will not survive server restarts because although
> the messages will survive, there will be no entries in mnesia saying the
> exchange/queue ever existed.
>
> Thus having at least one disk node solves this because mnesia shares all
> information across all nodes in a cluster - thus the disk node will
> record everything necessary.
>
>> Also is it true that the output of the first node
>> listed in rabbitmqctl status is the ram node?  So given the following
>> output:
>>  {nodes,[rabbit at rabbit1,rabbit at rabbit2,rabbit at rabbit3]},
>> We can assume that rabbit1 is the ram node and rabbit2 and rabbit3 are
>> disk nodes.
>
> No. The output of rabbitmqctl status indicates every node that is in the
> cluster, and does not indicate which of the nodes are RAM nodes and
> which are disk nodes.
>
> Matthew
>




More information about the rabbitmq-discuss mailing list