You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Javier Leyba <xl...@gmail.com> on 2006/07/25 12:48:08 UTC

How to know if a broker died

Hi

I´ve a network of nodes where each node is a master/slave broker.

I know if a master fails, a slave will take control of situation and
then will be necesary a manual procedure to restart fixed failed
master again.

I found this process ok, but I wonder what could happen if human
operator forgets to make recovery process and just re-start failed
master broker without fix it and recovery it. Is there a way to
programatically know at start up that a master was stopped by a
problem in the last shutdown. If I can do this, I can send a message
or something else to notify the problem to human operator.


Thanks in advance


-- 
Javier Leyba
Barcelona - Spain
http://blog.leyba.com.ar

Re: How to know if a broker died

Posted by James Strachan <ja...@gmail.com>.
On 7/25/06, Javier Leyba <xl...@gmail.com> wrote:
> James
>
> If I configure two brokers with JDBC Master Slave, could I force one
> to be a master ?

Basically its dependent on which one you start first - your JDBC
database decides who's gonna get the lock. (You might be able to do
some secret ninja DBA jedi mind tricks to get the database to choose
another process by default but am not aware of anything definitive
myself).

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: How to know if a broker died

Posted by Javier Leyba <xl...@gmail.com>.
James

If I configure two brokers with JDBC Master Slave, could I force one
to be a master ?

Thanks in advance


On 7/25/06, Javier Leyba <xl...@gmail.com> wrote:
> On 7/25/06, James Strachan <ja...@gmail.com> wrote:
> >
> > So those 2 new master slave options do not need any manual recovery
> > (since there is no replication at the broker level, they both rely on
> > a shared resource (database or file system) so you don't have to have
> > an operational procedure to bring back old masters.
> >
>
> Ok, thanks.
>
> I guess I'll not need a crossed configuration in this scenario too.
> I'll make some new tests.
>
> Thank you.
>
>
> --
> Javier Leyba
> Barcelona - Spain
> http://blog.leyba.com.ar
>


-- 
Javier Leyba
Barcelona - Spain
http://blog.leyba.com.ar

Re: How to know if a broker died

Posted by Javier Leyba <xl...@gmail.com>.
On 7/25/06, James Strachan <ja...@gmail.com> wrote:
>
> So those 2 new master slave options do not need any manual recovery
> (since there is no replication at the broker level, they both rely on
> a shared resource (database or file system) so you don't have to have
> an operational procedure to bring back old masters.
>

Ok, thanks.

I guess I'll not need a crossed configuration in this scenario too.
I'll make some new tests.

Thank you.


-- 
Javier Leyba
Barcelona - Spain
http://blog.leyba.com.ar

Re: How to know if a broker died

Posted by James Strachan <ja...@gmail.com>.
On 7/25/06, Javier Leyba <xl...@gmail.com> wrote:
> On 7/25/06, James Strachan <ja...@gmail.com> wrote:
> >
> > You could monitor the servers via JMX. Maybe we could get the slave to
> > send out an advisory when it becomes the new master so folks can
> > subscribe to an advisory for such things?
> >
> > Incidentally if you have a shared file system or are happy sacrificing
> > some performance for pure JDBC and avoiding the high performance
> > journal you can use auto-failover where you can run as many slave
> > brokers as required and there is no broker-broker synchronisation
> > required...
> >
> > http://activemq.org/site/jdbc-master-slave.html
> > http://activemq.org/site/shared-file-system-master-slave.html
> >
>
> James
>
> Thanks for your reply.
>
> I' m a little bit confused with those new features you told me.

So those 2 new master slave options do not need any manual recovery
(since there is no replication at the broker level, they both rely on
a shared resource (database or file system) so you don't have to have
an operational procedure to bring back old masters.

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: How to know if a broker died

Posted by Javier Leyba <xl...@gmail.com>.
On 7/25/06, James Strachan <ja...@gmail.com> wrote:
>
> You could monitor the servers via JMX. Maybe we could get the slave to
> send out an advisory when it becomes the new master so folks can
> subscribe to an advisory for such things?
>
> Incidentally if you have a shared file system or are happy sacrificing
> some performance for pure JDBC and avoiding the high performance
> journal you can use auto-failover where you can run as many slave
> brokers as required and there is no broker-broker synchronisation
> required...
>
> http://activemq.org/site/jdbc-master-slave.html
> http://activemq.org/site/shared-file-system-master-slave.html
>

James

Thanks for your reply.

I' m a little bit confused with those new features you told me.

As I said before, I've a network of nodes where each node is a
master/slave. I've been making tests with two machines with crossed
master/slaves (ie: machine 1 run master A and slave B and machine 2
run master B and slave A).

I' ve defined client url´s with failover over masters to test what
happen if a whole machine dies. In this scenario, subscribers and
publishers (I'm using topics) worked fine after I killed my machine 1.

Then, I couldn´t see a difference between a failover over masters and
to have a master slave config. Which are the advantages of
master/slave ?


Thanks in advance.

-- 
Javier Leyba
Barcelona - Spain
http://blog.leyba.com.ar

Re: How to know if a broker died

Posted by James Strachan <ja...@gmail.com>.
On 7/25/06, Javier Leyba <xl...@gmail.com> wrote:
> Hi
>
> I´ve a network of nodes where each node is a master/slave broker.
>
> I know if a master fails, a slave will take control of situation and
> then will be necesary a manual procedure to restart fixed failed
> master again.
>
> I found this process ok, but I wonder what could happen if human
> operator forgets to make recovery process and just re-start failed
> master broker without fix it and recovery it. Is there a way to
> programatically know at start up that a master was stopped by a
> problem in the last shutdown. If I can do this, I can send a message
> or something else to notify the problem to human operator.

You could monitor the servers via JMX. Maybe we could get the slave to
send out an advisory when it becomes the new master so folks can
subscribe to an advisory for such things?

Incidentally if you have a shared file system or are happy sacrificing
some performance for pure JDBC and avoiding the high performance
journal you can use auto-failover where you can run as many slave
brokers as required and there is no broker-broker synchronisation
required...

http://activemq.org/site/jdbc-master-slave.html
http://activemq.org/site/shared-file-system-master-slave.html

-- 

James
-------
http://radio.weblogs.com/0112098/