You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Ed Kilby <ek...@edwtech.com> on 2017/02/15 14:05:08 UTC

Single install Karaf failover configuration using shared disk

I'm looking to implement failover (master/slave) for Karaf. Our current 
server setup has two application servers that have a shared SAN disk where 
our current Java applications are installed in a single location and can 
be started on either machine or both machines at the same time.

I was looking to implement Karaf master/slave failover in a similar way 
(one install being shared by both app servers), however I'm not sure that 
this is really a well beaten path and would appreciate some advice on 
whether the alternatives (mentioned below) are significantly better.

Current idea for failover:
Install Karaf once on the shared SAN and setup basic file locking on this 
shared disk.
Both application servers will effectively initiate the Karaf start script, 
however only one (the first) will fully start (grabbing the lock) and the 
second will remain in standby until it grabs the lock (if the master falls 
over)

The main benefit I can see from this is that I only have to manage 
deploying components to one Karaf installation and I only need to manage 
one Karaf installation.

Alternatives:
We install Karaf in two separate locations on the shared SAN and setup to 
lock to the same lock file.
Each application server will have their own Karaf instance, thus start 
script to run.

This will make our deployment slightly more complicated (2 Karaf 
installations to manage and deploy to).

I'd be interested if anyone can indicate any specific concerns that they 
have with the current idea.

Note: I understand that Karaf-cellar can simplify my Karaf instance 
management, however we would need to undertake another round of PoCs etc.. 
to approve our company use of cellar (as a separate product). Something 
that I'd like to migrate to in the future.




EDW Technology Limited is a company registered in England and Wales with company number 3112883 and VAT number 667767961. 
Registered office: EDW House, 3 Radian Court, Knowlhill, Milton Keynes, MK5 8PJ

Re: Single install Karaf failover configuration using shared disk

Posted by Ed Kilby <ek...@edwtech.com>.
Thanks Achim, 

Yeah, I read the documentation and  tried it out to make sure it worked, 
but wasn't sure if there could be cases where a failed master could leave 
the Karaf install in a state that meant the cold stand-by was potentially 
impacted.

Sounds like that's not really the case and as long as I set the start 
level to 1 then I'm good to go.

Thanks for your response

Kind regards

Edward Kilby



From:   Achim Nierbeck <bc...@googlemail.com>
To:     "user@karaf.apache.org" <us...@karaf.apache.org>
Date:   17/02/2017 18:50
Subject:        Re: Single install Karaf failover configuration using 
shared disk



Hi, 

did you take a look at the documentation[1]?
I think that should be enough to run Karaf in a HA - Failover mode :-)
With a Filesystem lock and a certain "start"-level for your bundles that 
should be easily configurable between a Cold and a Hot-Stand-By. 

regards, Achim 

[1] - http://karaf.apache.org/manual/latest/#_ha_failover_and_cluster

2017-02-15 15:05 GMT+01:00 Ed Kilby <ek...@edwtech.com>:
I'm looking to implement failover (master/slave) for Karaf. Our current 
server setup has two application servers that have a shared SAN disk where 
our current Java applications are installed in a single location and can 
be started on either machine or both machines at the same time. 

I was looking to implement Karaf master/slave failover in a similar way 
(one install being shared by both app servers), however I'm not sure that 
this is really a well beaten path and would appreciate some advice on 
whether the alternatives (mentioned below) are significantly better. 

Current idea for failover: 
Install Karaf once on the shared SAN and setup basic file locking on this 
shared disk. 
Both application servers will effectively initiate the Karaf start script, 
however only one (the first) will fully start (grabbing the lock) and the 
second will remain in standby until it grabs the lock (if the master falls 
over) 

The main benefit I can see from this is that I only have to manage 
deploying components to one Karaf installation and I only need to manage 
one Karaf installation. 

Alternatives: 
We install Karaf in two separate locations on the shared SAN and setup to 
lock to the same lock file. 
Each application server will have their own Karaf instance, thus start 
script to run. 

This will make our deployment slightly more complicated (2 Karaf 
installations to manage and deploy to). 

I'd be interested if anyone can indicate any specific concerns that they 
have with the current idea. 

Note: I understand that Karaf-cellar can simplify my Karaf instance 
management, however we would need to undertake another round of PoCs etc.. 
to approve our company use of cellar (as a separate product). Something 
that I'd like to migrate to in the future. 



EDW Technology Limited is a company registered in England and Wales with 
company number 3112883 and VAT number 667767961. 
Registered office: EDW House, 3 Radian Court, Knowlhill, Milton Keynes, 
MK5 8PJ

[PP-Node-1]



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & 
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master 
[PP-Node-1]

EDW Technology Limited is a company registered in England and Wales with company number 3112883 and VAT number 667767961. 
Registered office: EDW House, 3 Radian Court, Knowlhill, Milton Keynes, MK5 8PJ

Re: Single install Karaf failover configuration using shared disk

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

did you take a look at the documentation[1]?
I think that should be enough to run Karaf in a HA - Failover mode :-)
With a Filesystem lock and a certain "start"-level for your bundles that
should be easily configurable between a Cold and a Hot-Stand-By.

regards, Achim

[1] - http://karaf.apache.org/manual/latest/#_ha_failover_and_cluster

2017-02-15 15:05 GMT+01:00 Ed Kilby <ek...@edwtech.com>:

> I'm looking to implement failover (master/slave) for Karaf. Our current
> server setup has two application servers that have a shared SAN disk where
> our current Java applications are installed in a single location and can be
> started on either machine or both machines at the same time.
>
> I was looking to implement Karaf master/slave failover in a similar way
> (one install being shared by both app servers), however I'm not sure that
> this is really a well beaten path and would appreciate some advice on
> whether the alternatives (mentioned below) are significantly better.
>
> *Current idea for failover:*
> Install Karaf once on the shared SAN and setup basic file locking on this
> shared disk.
> Both application servers will effectively initiate the Karaf start script,
> however only one (the first) will fully start (grabbing the lock) and the
> second will remain in standby until it grabs the lock (if the master falls
> over)
>
> The main benefit I can see from this is that I only have to manage
> deploying components to one Karaf installation and I only need to manage
> one Karaf installation.
>
> *Alternatives*:
> We install Karaf in two separate locations on the shared SAN and setup to
> lock to the same lock file.
> Each application server will have their own Karaf instance, thus start
> script to run.
>
> This will make our deployment slightly more complicated (2 Karaf
> installations to manage and deploy to).
>
> I'd be interested if anyone can indicate any specific concerns that they
> have with the current idea.
>
> *Note*: I understand that Karaf-cellar can simplify my Karaf instance
> management, however we would need to undertake another round of PoCs etc..
> to approve our company use of cellar (as a separate product). Something
> that I'd like to migrate to in the future.
>
>
>
> EDW Technology Limited is a company registered in England and Wales with
> company number 3112883 and VAT number 667767961.
>
> Registered office: EDW House, 3 Radian Court, Knowlhill, Milton Keynes,
> MK5 8PJ
>
> [PP-Node-1]
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master