You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Xiong Zou <zo...@gmail.com> on 2014/01/06 04:24:05 UTC

Can you please help to clarify my doubts in HA cluster managing

Hi All,

Here is a newbie to QPID. I am planning to setup a HA cluster with the QPID
as its underlying messaging layer. After going through all Apache QPID
online documenation, I am unable to find the solution to my following
question:

   How can an Exchange on the Passive Node in the cluter knows that it
resides in a passive broker and need to handle incoming messages
differently that when it has been actived as primary node?

Can we get such information with C++ API classes? I have checked class
Connection, Session and Message. They seem not having such API calls.

Can you please help?

Thanks a lot in advance!
Xiong Zou

RE: Can you please help to clarify my doubts in HA cluster managing

Posted by Xiong Zou <zo...@gmail.com>.
Hi Steve,

Thanks a lot for your clarifications. It is much clearer now. On top of the
QPID HA Cluster, we will manage our service utilities for their own HA.

Thanks & regards,
Xiong 



--
View this message in context: http://qpid.2158936.n2.nabble.com/Can-you-please-help-to-clarify-my-doubts-in-HA-cluster-managing-tp7602265p7602368.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


RE: Can you please help to clarify my doubts in HA cluster managing

Posted by Steve Huston <sh...@riverace.com>.
Hi Xiong,

> Thanks a lot Steve and Alan, appreciate your prompt helps.

You're welcome.

> I guess I have not posted my ideas clearly. Let me describe it below for your
> better information.
> 
> After going through the link provided by Alan, I realize that HA is only to
> group two nodes into a cluster for high availability. Clients or Exchanges need
> to connect to virtual IP for message communication. QPID Messaging Bus
> itself is HA, but Clients or Exchanges connect to QPID are not automatically
> HA ready. Please correct me if my understanding is wrong.

That's basically right, but Exchanges don't connect to Qpid - an Exchange is a AMQP 0-10 artifact that is managed by Qpid broker. The client connects to the broker and sends messages to an exchange. As such, the Exchange is part of the HA broker.

> What we are intended to achieve is that we have two physical boxes, one
> box shall have a server instance, for example a billing utility, running as
> primary service provider, another box shall have an identical billing utility
> running which is a hot-backup of the primary one. Messages passed to
> primary instance will be processed as normal, while messages duplicated to
> backup instance will be processed and update its internal status only. Once
> Primary instance or primary box is down, backup instance or box will take
> over. Is there any existing mechanism provided by QPID to achieve this
> purpose to ease our effort?

First, to run an HA cluster that can continue to function when one dies you should have at least 3 nodes. (That's a clustering issue,  not limited to Qpid).

Assuming you have a cluster that can continue to function when one node dies, one of the passive brokers will be promoted to primary/active and continue to provide service.

Your client (billing utility) would see the connection to the broker go down. It could then be re-established when the new broker becomes active. If you are running the client on the same node as the broker, you will need to design an HA solution for the client as well. You could take advantage of the clustering facilities for this. I would recommend you study the RH clustering docs for information on your options.

-Steve


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


Re: Can you please help to clarify my doubts in HA cluster managing

Posted by Xiong Zou <zo...@gmail.com>.
Thanks a lot Steve and Alan, appreciate your prompt helps.

I guess I have not posted my ideas clearly. Let me describe it below for
your better information.

After going through the link provided by Alan, I realize that HA is only to
group two nodes into a cluster for high availability. Clients or Exchanges
need to connect to virtual IP for message communication. QPID Messaging Bus
itself is HA, but Clients or Exchanges connect to QPID are not automatically
HA ready. Please correct me if my understanding is wrong.

What we are intended to achieve is that we have two physical boxes, one box
shall have a server instance, for example a billing utility, running as
primary service provider, another box shall have an identical billing
utility running which is a hot-backup of the primary one. Messages passed to
primary instance will be processed as normal, while messages duplicated to
backup instance will be processed and update its internal status only. Once
Primary instance or primary box is down, backup instance or box will take
over. Is there any existing mechanism provided by QPID to achieve this
purpose to ease our effort?

Looking forward to your insights.

Thanks,
Xiong Zou





--
View this message in context: http://qpid.2158936.n2.nabble.com/Can-you-please-help-to-clarify-my-doubts-in-HA-cluster-managing-tp7602265p7602295.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: Can you please help to clarify my doubts in HA cluster managing

Posted by Alan Conway <ac...@redhat.com>.
On 01/06/2014 12:35 PM, Steve Huston wrote:
> Hi Xiong,
>
>> Hi All,
>>
>> Here is a newbie to QPID.
>
> Welcome!
>
>> I am planning to setup a HA cluster with the QPID
>> as its underlying messaging layer. After going through all Apache QPID online
>> documenation, I am unable to find the solution to my following
>> question:
>>
>>     How can an Exchange on the Passive Node in the cluter knows that it
>> resides in a passive broker and need to handle incoming messages
>> differently that when it has been actived as primary node?
>
> The active broker will receive all the messages.
> The usual way this is handled is for a virtual IP address to be assigned for the cluster's brokers - the address is assigned to the node where the active broker is running. Thus, all connections to the virtual IP address go to the active broker.
>
>> Can we get such information with C++ API classes? I have checked class
>> Connection, Session and Message. They seem not having such API calls.
>
> The API doesn't know about HA, by design.

That's correct, HA replication and failover are intended to be transparent to 
the client code.

If you are interested in the gory details of how HA replication, failover etc 
are implemented, you can take a look at the source code, start from 
qpid/cpp/src/qpid/ha/README.h

If you're more interested in just using the HA features then I'd start with the 
qpid book:
  http://qpid.apache.org/releases/qpid-0.24/cpp-broker/book/chapter-ha.html

Good luck, shout if you run into difficulties.

Cheers,
Alan.

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


RE: Can you please help to clarify my doubts in HA cluster managing

Posted by Steve Huston <sh...@riverace.com>.
Hi Xiong,

> Hi All,
> 
> Here is a newbie to QPID.

Welcome!

> I am planning to setup a HA cluster with the QPID
> as its underlying messaging layer. After going through all Apache QPID online
> documenation, I am unable to find the solution to my following
> question:
> 
>    How can an Exchange on the Passive Node in the cluter knows that it
> resides in a passive broker and need to handle incoming messages
> differently that when it has been actived as primary node?

The active broker will receive all the messages.
The usual way this is handled is for a virtual IP address to be assigned for the cluster's brokers - the address is assigned to the node where the active broker is running. Thus, all connections to the virtual IP address go to the active broker.

> Can we get such information with C++ API classes? I have checked class
> Connection, Session and Message. They seem not having such API calls.

The API doesn't know about HA, by design.

> Can you please help?

If this doesn't answer what you need, please ask again.

> Thanks a lot in advance!

You're welcome.

-Steve Huston


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