Erlang/OTP Forums

Author Message

<  RabbitMQ mailing list  ~  Adding new nodes to a cluster

Guest
Posted: Fri Oct 02, 2009 7:57 pm Reply with quote
Guest
Hi guys,
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)? 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@rabbit1,rabbit@rabbit2,rabbit@rabbit3]},
We can assume that rabbit1 is the ram node and rabbit2 and rabbit3 are
disk nodes.

Thanks,
Sammy

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist
Guest
Posted: Mon Oct 05, 2009 4:21 pm Reply with quote
Guest
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@rabbit1,rabbit@rabbit2,rabbit@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

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist
Guest
Posted: Mon Oct 05, 2009 5:21 pm Reply with quote
Guest
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@lshift.net> wrote:
> Hi Sammy,
>
> On Fri, Oct 02, 2009 at 12:56:21PM -0700, Sammy Yu wrote:
>>

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum