Summary: What's the best practice for updating a node in a load balanced cluster?
We use RabbitMQ Cluster behind a ha proxy load balancer to support easy clustering for our clients, as suggested in the RabbitMQ docs
Though the docs suggest this, they don't describe the best way to remove a node from the cluster for upgrades, and put it back in.
rabbitmqctl stop_app
on the node itself, and wait for it to shutdownbut I've had it suggested that we should remove it from ha proxy first, basically swapping steps 1 and 2 above
rabbitmqctl stop_app
on the node itself, and wait for it to shutdownWhich is the best way to do this?
For me, the obvious way would be to tell you haproxy that you want to stop sending requests to a server, and then stop the server itself, instead of the other way around.
I'm curious as to why you would want to stop the server first, and then put it into maint ? If you do it like this, some requests will go to your node before it is known that it is gone. I believe you can have haproxy set up to re-send those missed calls; so best case you have some requests that are a bit slower, worst case you have some missed requests.
There is no specific downside I can see with setting it in maint mode first so I would not consider the other option personally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With