Menu Search

10.2. High Availability Overview

The Broker provides a HA implementation offering an Active/Passive mode of operation. When using HA, many instances of the Broker work together to form an high availability group of two or more nodes.

The remainder of this section now talks about the specifics of how HA is achieved in terms of the concepts introduced earlier in this book.

The Virtualhost is the unit of replication. This means that any durable queues, exchanges, and bindings belonging to that virtualhost, any persistent messages contained within the queues and any attribute settings applied to the virtualhost itself are automatically replicated to all nodes within the group.[11]

It is the Virtualhost Nodes (from different Broker instances) that join together to form a group. The virtualhost nodes collectively to coordinate the group: they organise replication between the master and replicas and conduct elections to determine who becomes the new master in the event of the old failing.

When a virtualhost node is in the master role, the virtualhost beneath it is available for messaging work. Any write operations sent to the virtualhost are automatically replicated to all other nodes in group.

When a virtualhost node is in the replica role, the virtualhost beneath it is always unavailable for message work. Any attempted connections to a virtualhost in this state are automatically turned away, allowing a messaging client to discover where the master currently resides. When in replica role, the node sole responsibility is to consume a replication stream in order that it remains up to date with the master.

Messaging clients discover the active virtualhost.This can be achieved using a static technique (for instance, a failover url (a feature of the Apache Qpid JMS and Apache Qpid JMS AMQP 0-x clients), or a dynamic one utilising some kind of proxy or virtual IP (VIP).

The figure that follows illustrates a group formed of three virtualhost nodes from three separate Broker instances. A client is connected to the virtualhost node that is in the master role. The two virtualhost nodes weather1 and weather3 are replicas and are receiving a stream of updates.

Figure 10.1. 3-node group deployed across three Brokers.

Diagram showing a 3 node group deployed across three Brokers

Currently, the only virtualhost/virtualhost node type offering HA is BDB HA. Internally, this leverages the HA capabilities of the Berkeley DB JE edition.

Note

The HA solution from the Apache Qpid Broker-J is incompatible with the HA solution offered by the CPP Broker. It is not possible to co-locate Qpid Broker-J and CPP Brokers within the same group.



[11] Transient messages and messages on non-durable queues are not replicated.