[rabbitmq-discuss] RabbitMQ's Mirroring results in weird behavior when slave goes down

thomas taihock at gmail.com
Tue Jun 25 07:28:00 BST 2013


I have set up 3 cluster nodes namely rabbit at A, rabbit at B, rabbit at C all running
on erlang 16B and rabbitmq 3.1.1. I set net_ticktime to 2 so as to detect
node failure faster.

I have did some test on it and found that there seems to be a weird behavior
when setting policy for mirroring.
For the purpose of testing, I modified the code for the java tutorial 1
hello world to send out 200,000 messages instead of 1 and also the queue is
created using the management console and not created in the code. Each time
it sends a message it will print out the current number starting from 1 til
199,999

Below is what I did:

1)For my 1st test, I only added a queue for the sending of messages which I
call it "test". Throughout this test rabbit at A is the master. Halfway into
sending the messages i will cut off the network connection for rabbit at B. The
observation is that there is no disruption to the master. The result is
consistent for 10 tries.

2)For my 2nd test, it is almost identical to the 1st test except that i am
using mirroring using the following command:

rabbitmqctl set_policy HA '^(?!amq\.).*' '{"ha-mode": "all"}'"

The observation is different from that of the 1st test. Shortly after I cut
off the network connection from rabbit at B, rabbit at A which is the master
handling the client's messages comes to a pause for over 15 seconds and the
pause is consistent for 10 tries. The client gets stuck in basic publish
when rabbit at A comes to a pause.



I am quite puzzled about this behavior and would like to find out if that is
the intended behavior for rabbit's mirroring feature? Does anyone else
encounter such behavior when using mirroring? 

I have attached my code for sending messages. Thanks.
send.txt <http://rabbitmq.1065348.n5.nabble.com/file/n27572/send.txt>  



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/RabbitMQ-s-Mirroring-results-in-weird-behavior-when-slave-goes-down-tp27572.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list