You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Oscar Pernas <os...@pernas.es> on 2011/03/24 13:27:01 UTC

Failover, how does it work?

Hi all (again),


Im trying to understand well, how the failover transport works. I know that
if you have an active-pasive architecture and your active broker goes down,
all messages are send to the pasive broker. But, for example, if we have a
machine that have configured an active-pasive brokers configuration like
this:

failover://(tcp://localhost:61616,localhost2:61616)?randomize=false

If you remove the ethernet network cable, this machine couldnt connect to
any broker, but if I plug-in the cable again, to which broker the connection
will be stablished? if is developed like a pooling, could really happen that
this machine connect to the pasive broker instead to the first one?

If this could happen, what is the usual way to change this machine to the
active? Im using activemq-cpp.


regards

-- 
Óscar Pernas Plaza.

RE: Failover, how does it work?

Posted by "Nakarikanti, Nageswara" <NN...@dwd.IN.gov>.
No.

When Ever Slave kicks in...that becomes Master. The Old master becomes slave and will be waiting to get the lock to become master whenever 'the current' master goes down.

Thank You,
Nag.

________________________________
From: Oscar Pernas [mailto:oscar@pernas.es]
Sent: Tuesday, March 29, 2011 8:23 AM
To: users@activemq.apache.org
Cc: Nakarikanti, Nageswara
Subject: Re: Failover, how does it work?

To send email or notification we are thinking in use a monitorization tool like nagios or something more light...

About the manual restart, i think that you could take a look about linux-heartbeat v2, you could configure services to monitorize and make petitions.


One more question, If we have a cluster, if the master goes down, all messages goes to the slave, but, if we start the master again, all messages will send to the master again?

2011/3/29 Nakarikanti, Nageswara <NN...@dwd.in.gov>>
And, adding  my question...

When Master Broker goes down, is there any way that administrators get a notification(e-mail etc...) that it went down.

Should Only a "manual" restart to bring it up again?


Thank You,
Nag.



-----Original Message-----
From: Timothy Bish [mailto:tabish121@gmail.com<ma...@gmail.com>]
Sent: Thursday, March 24, 2011 10:32 AM
To: users@activemq.apache.org<ma...@activemq.apache.org>
Subject: Re: Failover, how does it work?

On Thu, 2011-03-24 at 13:27 +0100, Oscar Pernas wrote:
> Hi all (again),
>
>
> Im trying to understand well, how the failover transport works. I know
> that if you have an active-pasive architecture and your active broker
> goes down, all messages are send to the pasive broker. But, for
> example, if we have a machine that have configured an active-pasive
> brokers configuration like
> this:
>
> failover://(tcp://localhost:61616,localhost2:61616)?randomize=false
>
> If you remove the ethernet network cable, this machine couldnt connect
> to any broker, but if I plug-in the cable again, to which broker the
> connection will be stablished? if is developed like a pooling, could
> really happen that this machine connect to the pasive broker instead to the first one?
>
> If this could happen, what is the usual way to change this machine to
> the active? Im using activemq-cpp.

The slave broker won't accept connections until it becomes the master so the client won't connect to a slave.  It will just keep moving through the list of URI's attempting to connect until a broker becomes available.

Regards

--
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com<ma...@fusesource.com>
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/





--
Óscar Pernas Plaza.

Re: Failover, how does it work?

Posted by Oscar Pernas <os...@pernas.es>.
To send email or notification we are thinking in use a monitorization tool
like nagios or something more light...

About the manual restart, i think that you could take a look about
linux-heartbeat v2, you could configure services to monitorize and make
petitions.


One more question, If we have a cluster, if the master goes down, all
messages goes to the slave, but, if we start the master again, all messages
will send to the master again?

2011/3/29 Nakarikanti, Nageswara <NN...@dwd.in.gov>

> And, adding  my question...
>
> When Master Broker goes down, is there any way that administrators get a
> notification(e-mail etc...) that it went down.
>
> Should Only a "manual" restart to bring it up again?
>
>
> Thank You,
> Nag.
>
>
>
> -----Original Message-----
> From: Timothy Bish [mailto:tabish121@gmail.com]
> Sent: Thursday, March 24, 2011 10:32 AM
> To: users@activemq.apache.org
> Subject: Re: Failover, how does it work?
>
> On Thu, 2011-03-24 at 13:27 +0100, Oscar Pernas wrote:
> > Hi all (again),
> >
> >
> > Im trying to understand well, how the failover transport works. I know
> > that if you have an active-pasive architecture and your active broker
> > goes down, all messages are send to the pasive broker. But, for
> > example, if we have a machine that have configured an active-pasive
> > brokers configuration like
> > this:
> >
> > failover://(tcp://localhost:61616,localhost2:61616)?randomize=false
> >
> > If you remove the ethernet network cable, this machine couldnt connect
> > to any broker, but if I plug-in the cable again, to which broker the
> > connection will be stablished? if is developed like a pooling, could
> > really happen that this machine connect to the pasive broker instead to
> the first one?
> >
> > If this could happen, what is the usual way to change this machine to
> > the active? Im using activemq-cpp.
>
> The slave broker won't accept connections until it becomes the master so
> the client won't connect to a slave.  It will just keep moving through the
> list of URI's attempting to connect until a broker becomes available.
>
> Regards
>
> --
> Tim Bish
> ------------
> FuseSource
> Email: tim.bish@fusesource.com
> Web: http://fusesource.com
> Twitter: tabish121
> Blog: http://timbish.blogspot.com/
>
>
>


-- 
Óscar Pernas Plaza.

RE: Failover, how does it work?

Posted by "Nakarikanti, Nageswara" <NN...@dwd.IN.gov>.
And, adding  my question...

When Master Broker goes down, is there any way that administrators get a notification(e-mail etc...) that it went down.

Should Only a "manual" restart to bring it up again?


Thank You,
Nag.



-----Original Message-----
From: Timothy Bish [mailto:tabish121@gmail.com] 
Sent: Thursday, March 24, 2011 10:32 AM
To: users@activemq.apache.org
Subject: Re: Failover, how does it work?

On Thu, 2011-03-24 at 13:27 +0100, Oscar Pernas wrote:
> Hi all (again),
> 
> 
> Im trying to understand well, how the failover transport works. I know 
> that if you have an active-pasive architecture and your active broker 
> goes down, all messages are send to the pasive broker. But, for 
> example, if we have a machine that have configured an active-pasive 
> brokers configuration like
> this:
> 
> failover://(tcp://localhost:61616,localhost2:61616)?randomize=false
> 
> If you remove the ethernet network cable, this machine couldnt connect 
> to any broker, but if I plug-in the cable again, to which broker the 
> connection will be stablished? if is developed like a pooling, could 
> really happen that this machine connect to the pasive broker instead to the first one?
> 
> If this could happen, what is the usual way to change this machine to 
> the active? Im using activemq-cpp.

The slave broker won't accept connections until it becomes the master so the client won't connect to a slave.  It will just keep moving through the list of URI's attempting to connect until a broker becomes available.

Regards

--
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/



Re: Failover, how does it work?

Posted by Timothy Bish <ta...@gmail.com>.
On Thu, 2011-03-24 at 13:27 +0100, Oscar Pernas wrote:
> Hi all (again),
> 
> 
> Im trying to understand well, how the failover transport works. I know that
> if you have an active-pasive architecture and your active broker goes down,
> all messages are send to the pasive broker. But, for example, if we have a
> machine that have configured an active-pasive brokers configuration like
> this:
> 
> failover://(tcp://localhost:61616,localhost2:61616)?randomize=false
> 
> If you remove the ethernet network cable, this machine couldnt connect to
> any broker, but if I plug-in the cable again, to which broker the connection
> will be stablished? if is developed like a pooling, could really happen that
> this machine connect to the pasive broker instead to the first one?
> 
> If this could happen, what is the usual way to change this machine to the
> active? Im using activemq-cpp.

The slave broker won't accept connections until it becomes the master so
the client won't connect to a slave.  It will just keep moving through
the list of URI's attempting to connect until a broker becomes
available.

Regards

-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/