blob: 3ec50adb8d51cffe13b04507c09c86c6f401833d [file] [log] [blame]
<div class="docbook"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">10.2. High Availability Overview</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="Java-Broker-High-Availability.html">Prev</a> </td><th width="60%" align="center">Chapter 10. High Availability</th><td width="20%" align="right"> <a accesskey="n" href="Java-Broker-High-Availability-CreatingGroup.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="Java-Broker-High-Availability-OverviewOfHA"></a>10.2. High Availability Overview</h2></div></div></div><p>The Broker provides a HA implementation offering an <span class="bold"><strong>Active/Passive</strong></span> mode of operation.
When using HA, many instances of the Broker work together to form an high availability group of two or more nodes.</p><p>The remainder of this section now talks about the specifics of how HA is achieved in terms
of the <a class="link" href="Java-Broker-Concepts.html" title="Chapter 4. Concepts">concepts</a> introduced earlier in this
book.</p><p>The <a class="link" href="Java-Broker-Concepts-Virtualhosts.html" title="4.5. Virtualhosts">Virtualhost</a> is the unit of
replication. This means that any <span class="emphasis"><em>durable</em></span> queues, exchanges, and bindings
belonging to that virtualhost, any <span class="emphasis"><em>persistent</em></span> messages contained within
the queues and any attribute settings applied to the virtualhost itself are automatically
replicated to all nodes within the group.<a href="#ftn.d0e9757" class="footnote" id="d0e9757"><sup class="footnote">[11]</sup></a></p><p>It is the <a class="link" href="Java-Broker-Concepts-Virtualhost-Nodes.html" title="4.3. Virtualhost Nodes">Virtualhost Nodes</a>
(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.</p><p>When a virtualhost node is in the <span class="emphasis"><em>master</em></span> 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.</p><p>When a virtualhost node is in the <span class="emphasis"><em>replica</em></span> 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.</p><p>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).</p><p>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 <code class="literal">weather1</code> and <code class="literal">weather3</code>
are replicas and are receiving a stream of updates.</p><div class="figure"><a id="Java-Broker-High-Availability-OverviewOfHA-Figure"></a><p class="title"><strong>Figure 10.1. 3-node group deployed across three Brokers.</strong></p><div class="figure-contents"><div class="mediaobject"><table border="0" summary="manufactured viewport for HTML img" style="cellpadding: 0; cellspacing: 0;" width="100%"><tr><td><img src="images/HA-Overview.png" height="360" alt="Diagram showing a 3 node group deployed across three Brokers" /></td></tr></table></div></div></div><br class="figure-break" /><p>Currently, the only virtualhost/virtualhost node type offering HA is BDB HA. Internally,
this leverages the HA capabilities of the Berkeley DB JE edition.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>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.</p></div><div class="footnotes"><br /><hr style="width:100; text-align:left;margin-left: 0" /><div id="ftn.d0e9757" class="footnote"><p><a href="#d0e9757" class="para"><sup class="para">[11] </sup></a>Transient messages and messages on non-durable queues are not replicated.</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Java-Broker-High-Availability.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Java-Broker-High-Availability.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-High-Availability-CreatingGroup.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 10. High Availability </td><td width="20%" align="center"><a accesskey="h" href="Apache-Qpid-Broker-J-Book.html">Home</a></td><td width="40%" align="right" valign="top"> 10.3. Creating a group</td></tr></table></div></div>