On 25 September 2014 at 13:45:16,
choonsi...@onapp.com (
choonsi...@onapp.com) wrote:
> The reason I am hesitate about setting up floating IP is that,
> as far as I know rabbitMQ HA cluster is a master/slave setup. While
> the queues can be configured to be fully replicated, however
> most transactions are handled by the main master node.
To clarify: those are queue masters, not node masters. In other words,
if you distributed connections that do queue.declare across the cluster,
there will be multiple "master nodes".
> > As discussed, for each mirrored queue there is one master and
> several slaves, each on a different node. The slaves apply the
> operations that occur to the master in exactly the same order
> as the master and thus maintain the same state. All actions other
> than publishes go only to the master, and the master then broadcasts
> the effect of the actions to the slaves. Thus clients consuming
> from a mirrored queue are in fact consuming from the master.
Correct.
> I don't feel comfortable about setting floating IP with corosync+pacemaker
> knowing this is a master/slave set up. As the setup is only dealing
> with dead server at the moment, the access to the HA cluster is
> expected to switch to the slave (and promote it to master) when
> the server running the master is completely dead. In other words,
> I want the floating IP to always direct to the master node if possible.
> (Please correct me if I am correct, if I have multiple queues,
> they don't necessarily all share the same master right? I mean
> some queue may have another node as master?)
See above. Queue master is on the node where that node was declared
(barring slave promotions.
> It would be nice if I can somehow set up a master/master replication.
Exchange federation can do that. One thing that it's missing is deletion of
consumed messages over federation links.
> Anyway, can anyone advise what can I do next to achieve my goal
> of having only 1 point of entry to this rabbitMQ cluster?
Set up an HAproxy node in front of your cluster and make all clients connect
to it. Start with the "leastconn" strategy. Now your problem is largely shifted to how
to make this node available. Having multiple proxy nodes and round-robin DNS
should work quite well.
See
https://www.digitalocean.com/community/tutorials/an-introduction-to-haproxy-and-load-balancing-concepts if you need an HAproxy intro.
--
MK
Staff Software Engineer, Pivotal/RabbitMQ