[rabbitmq-discuss] Clustered startup with multiple queues and multiple masters
Francesco Mazzoli
francesco at rabbitmq.com
Tue Jun 19 09:49:34 BST 2012
Hi Matt,
At Mon, 18 Jun 2012 11:16:40 -0700,
Matt Pietrek wrote:
>
> Francesco,
>
> Thanks very much for the detailed reply. It was extremely helpful.
Glad I could help.
> Question 1
> ----------------
> I stumbled across this in my own previous experimentation. The
> question is, do I risk message loss by first starting a node that
> joined the cluster late, thus not having the full set of messages that
> other nodes have?
No.
> Question 2
> ---------------
> Related to the above scenario, is there any danger (after an unplanned
> shutdown), in simply letting all the nodes start in parallel and
> letting Mnesia's waiting sort out the order? It seems to work OK in my
> limited testing so far, but I don't know if we're risking data loss.
It should be fine, but in general it's better to do cluster operations
sequentially and at one site. In this specific case it should be OK.
> Question 3
> ---------------
> You said:
>
> > In other words, it's up to you to restart them so that the node with the most up-to-date mnesia is started first
>
> Is there any information recorded somewhere (e.g. the logs), which
> would indicate which node has the "most up to date" Mnesia database? I
> see messages like:
>
> > Mirrored-queue (queue 'charon' in vhost '/'): Promoting slave
> <rabbit at play2.1.273.0> to master
>
> But don't know if they're necessarily correlated to who the most
> up-to-date Mnesia is.
Well, the fact that something got promoted to master tells you that
the previous master definitely went down before the promoted node.
There won't be precise information if you stop the nodes abruptly, but
you can look at "rabbit on node <node> down" messages in the logs -
the node in the clusters are linked in distributed Erlang and these
messages are generated when a node receives a 'DOWN' message from
another node. Since they are "info" messages, you need to make sure to
have those enabled - they are enabled by default but a lot of people
don't like them.
Francesco.
More information about the rabbitmq-discuss
mailing list