Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2BF8F17BEE for ; Wed, 15 Oct 2014 21:30:28 +0000 (UTC) Received: (qmail 23696 invoked by uid 500); 15 Oct 2014 21:30:28 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 23670 invoked by uid 500); 15 Oct 2014 21:30:28 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 23661 invoked by uid 99); 15 Oct 2014 21:30:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Oct 2014 21:30:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Oct 2014 21:30:22 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B4C272388A74; Wed, 15 Oct 2014 21:30:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1632181 [5/16] - in /qpid/site: docs/releases/qpid-trunk/ docs/releases/qpid-trunk/java-broker/ docs/releases/qpid-trunk/java-broker/book/ docs/releases/qpid-trunk/java-broker/book/images/ docs/releases/qpid-trunk/jms-client-0-8/ docs/rele... Date: Wed, 15 Oct 2014 21:29:57 -0000 To: commits@qpid.apache.org From: kwall@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141015213002.B4C272388A74@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-OverviewOfHA.html URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-OverviewOfHA.html?rev=1632181&view=auto ============================================================================== --- qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-OverviewOfHA.html (added) +++ qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-OverviewOfHA.html Wed Oct 15 21:29:55 2014 @@ -0,0 +1,161 @@ + + + + + 10.2. Overview of HA within the Java Broker - Apache Qpid™ + + + + + + + + + +
+ + + + + + +
+ +

10.2. Overview of HA within the Java Broker

The Java Broker provides a HA implementation offering an Active/Passive mode of operation. When using HA, many instances of the Java + 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.[13]

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 a Qpid Java Client)), 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. BDB JE is an optional dependency of + the Broker.

Note

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



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

+ +
+ + + + +
+
+ + Added: qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-Reset-Group-Infomational.html URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-Reset-Group-Infomational.html?rev=1632181&view=auto ============================================================================== --- qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-Reset-Group-Infomational.html (added) +++ qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-Reset-Group-Infomational.html Wed Oct 15 21:29:55 2014 @@ -0,0 +1,143 @@ + + + + + 10.12. Reset Group Information - Apache Qpid™ + + + + + + + + + +
+ + + + + + +
+ +

10.12. Reset Group Information

BDB JE internally stores details of the group within its database. There are some + circumstances when resetting this information is useful.

  • Copying data between environments (e.g. production to UAT)

  • Some disaster recovery situations where a group must be recreated on new + hardware

This is not an normal operation and is not usually required

The following command replaces the group table contained within the JE logs files with the + provided information.

Example 10.1. Resetting of replication group with DbResetRepGroup

java -cp je-5.0.97.jar com.sleepycat.je.rep.util.DbResetRepGroup -h path/to/jelogfiles
-groupName newgroupname -nodeName newnodename -nodeHostPort newhostname:5000


The modified log files can then by copied into + ${QPID_WORK}/<nodename>/config directory of a target Broker. Then + start the Broker, and add a BDB HA Virtualhost node specify the same group name, node name and + node address. You will then have a group with a single node, ready to start re-adding + additional nodes as described above.

+ +
+ + + + +
+
+ + Modified: qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-Security.html URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-Security.html?rev=1632181&r1=1632180&r2=1632181&view=diff ============================================================================== --- qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-Security.html (original) +++ qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability-Security.html Wed Oct 15 21:29:55 2014 @@ -21,7 +21,7 @@ --> - 13.12. Security - Apache Qpid™ + 10.10. Security - Apache Qpid™ @@ -106,8 +106,10 @@
- -

13.12. Security

At the moment Berkeley replication API supports only TCP/IP protocol to transfer replication data between Master and Replicas.

As result, the replicated data is unprotected and can be intercepted by anyone having access to the replication network.

Also, anyone who can access to this network can introduc e a new node and therefore receive a copy of the data.

In order to reduce the security risks the entire HA cluster is recommended to run in a separate network protected from general access.

+ +

10.10. Security

The replication stream between the master and the replicas is insecure and can be + intercepted by anyone having access to the replication network.

In order to reduce the security risks the entire HA group is recommended to run in a + separate network protected from general access and/or utilise SSH-tunnels/IPsec.


Modified: qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability.html URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability.html?rev=1632181&r1=1632180&r2=1632181&view=diff ============================================================================== --- qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability.html (original) +++ qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-High-Availability.html Wed Oct 15 21:29:55 2014 @@ -21,7 +21,7 @@ --> - Chapter 13. High Availability - Apache Qpid™ + Chapter 10. High Availability - Apache Qpid™ @@ -106,15 +106,17 @@
- -

Chapter 13. High Availability

13.1. General Introduction

The term High Availability (HA) usually refers to having a number of instances of a service such as a Message Broker - available so that should a service unexpectedly fail, or requires to be shutdown for maintenance, users may quickly connect - to another instance and continue their work with minimal interuption. HA is one way to make a overall system more resilient - by eliminating a single point of failure from a system.

HA offerings are usually categorised as Active/Active or Active/Passive. - An Active/Active system is one where all nodes within the cluster are usuaully available for use by clients all of the time. In an - Active/Passive system, one only node within the cluster is available for use by clients at any one time, whilst the others are in - some kind of standby state, awaiting to quickly step-in in the event the active node becomes unavailable. -

+ +

Chapter 10. High Availability

10.1. General Introduction

The term High Availability (HA) usually refers to having a number of instances of a + service such as a Message Broker available so that should a service unexpectedly fail, or + requires to be shutdown for maintenance, users may quickly connect to another instance and + continue their work with minimal interruption. HA is one way to make a overall system more + resilient by eliminating a single point of failure from a system.

HA offerings are usually categorised as Active/Active or + Active/Passive. An Active/Active system is one where all + nodes within the group are usually available for use by clients all of the time. In an + Active/Passive system, one only node within the group is available for use by clients at any + one time, whilst the others are in some kind of standby state, awaiting to quickly step-in in + the event the active node becomes unavailable.


Added: qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Configuration-Properties.html URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Configuration-Properties.html?rev=1632181&view=auto ============================================================================== --- qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Configuration-Properties.html (added) +++ qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Configuration-Properties.html Wed Oct 15 21:29:55 2014 @@ -0,0 +1,160 @@ + + + + + 5.7. Customising Configuration using Configuration Properties - Apache Qpid™ + + + + + + + + + +
+ + + + + + +
+ +

5.7. Customising Configuration using Configuration Properties

It is possible for 'Initial Configuration' (and Configuration Store) files to contain + ${properties} that can be resolved to String values at startup, allowing a degree of + customisation using a fixed file. Configuration Property values can be set either via + Java System Properties, or by specifying ConfigurationPproperties on the broker command + line. If both are defined, System Property values take precedence.

The broker has the following set of core configuration properties, with the indicated + default values if not otherwise configured by the user:

Table 5.1. Base Configuration Properties

Name Description Value
qpid.amqp_port Port number used for the brokers default AMQP messaging port "5672"
qpid.http_port Port number used for the brokers default HTTP management port "8080"
qpid.rmi_port Port number used for the brokers default RMI Registry port, to + advertise the JMX ConnectorServer. "8999"
qpid.jmx_port Port number used for the brokers default JMX port "9099"
qpid.home_dir Location of the broker installation directory, which contains + the 'lib' directory and the 'etc' directory often used to store + files such as group and ACL files. Defaults to the value set into the QPID_HOME system property if + it is set, or remains unset otherwise unless configured by the user. +
qpid.work_dir Location of the broker working directory, which might contain + the persistent message store and broker configuration store files. Defaults to the value set into the QPID_WORK system property if + it is set, or the 'work' subdirectory of the JVMs current working + directory.


+

Use of these core properties can be seen in the default 'Initial Configuration' example.

Configuration Properties can be set on the command line using the + -prop (or --configuration-property) + command line argument:

+$ ./qpid-server -prop "qpid.amqp_port=10000" -prop "qpid.http_port=10001"
+        

In the example above, property used to set the port number of the default AMQP port + is specified with the value 10000, overriding the default value of 5672, and similarly + the value 10001 is used to override the default HTTP port number of 8080. When using the + 'Initial Configuration' to initialise a new Configuration Store (either at first broker + startup, when requesting to overwrite the configuration store) these new values will be used for the + port numbers instead.

NOTE: When running the broker on Windows and starting it via the qpid-server.bat + file, the "name=value" argument MUST be quoted.

+ +
+ + + + +
+
+ + Added: qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Create-Initial-Config.html URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Create-Initial-Config.html?rev=1632181&view=auto ============================================================================== --- qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Create-Initial-Config.html (added) +++ qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Create-Initial-Config.html Wed Oct 15 21:29:55 2014 @@ -0,0 +1,151 @@ + + + + + 5.4. Creating an 'Initial Configuration' JSON File - Apache Qpid™ + + + + + + + + + +
+ + + + + + +
+ +

5.4. Creating an 'Initial Configuration' JSON File

It is possible to have the broker output its default internal 'Initial Configuration' + file to disk using the command line argument -cic (or + --create-initial-config). If the option is used without + providing a path, a file called initial-config.json will be created + in the current directory, or alternatively the file can be created at a specified + location:

+$ ./qpid-server -cic ./initial-config.json
+        

The 'Initial Configuration' JSON file shares a common format with the brokers JSON + Configuration Store implementation, so it is possible to use a brokers Configuration + Store output as an initial configuration. Typically 'Initial Configuration' files would + not to contain IDs for the configured entities, so that IDs will be generated when the + configuration store is initialised and prevent use of the same IDs across multiple + brokers, however it may prove useful to include IDs if using the Memory Configuration Store Type.

It can be useful to use Configuration + Properties within 'Initial Configuration' files to allow a degree of + customisation with an otherwise fixed file.

For an example file, see Section 5.8, “Example of JSON 'Initial Configuration'” +

+ +
+ + + + +
+
+ + Added: qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Initial-Config-Location.html URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Initial-Config-Location.html?rev=1632181&view=auto ============================================================================== --- qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Initial-Config-Location.html (added) +++ qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Initial-Config-Location.html Wed Oct 15 21:29:55 2014 @@ -0,0 +1,146 @@ + + + + + 5.3. 'Initial Configuration' Location - Apache Qpid™ + + + + + + + + + +
+ + + + + + +
+ +

5.3. 'Initial Configuration' Location

The 'Initial Configuration' JSON file is used when initialising new broker + configuration stores. The broker will default to using an internal file within its jar + unless otherwise instructed.

The command line argument -icp (or + --initial-config-path) can be used to override the brokers + internal file and supply a user-created + one:

+$ ./qpid-server -icp ./my-initial-configuration.json
+        

If a Configuration Store already exists at the current store location then the + current 'Initial Configuration' will be ignored unless otherwise requested to overwrite the configuration + store +

+ +
+ + + + +
+
+ + Added: qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Location.html URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Location.html?rev=1632181&view=auto ============================================================================== --- qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Location.html (added) +++ qpid/site/docs/releases/qpid-trunk/java-broker/book/Java-Broker-Initial-Configuration-Location.html Wed Oct 15 21:29:55 2014 @@ -0,0 +1,143 @@ + + + + + 5.2. Configuration Store Location - Apache Qpid™ + + + + + + + + + +
+ + + + + + +
+ +

5.2. Configuration Store Location

The broker will default to using ${qpid.work_dir}/config.json as the path for its configuration store unless + otherwise instructed.

The command line argument -sp (or + --store-path) can optionally be used to specify a different + relative or absolute path to use for the broker configuration store:

+$ ./qpid-server -sp ./my-broker-configuration.json
+        

If no configuration store exists at the specified/defaulted location when the broker + starts then one will be initialised using the current 'Initial + Configuration'.

+ +
+ + + + +
+
+ + --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org