Search code examples
cluster-computingapache-servicemix

ServiceMix and clustering


First of all I've read this post and it partially answered my question but here's my dilemma: I'd like to install ServiceMix on two different machines, and I want them to be working on failover. Which means if one instance dies for whatever reason the other one takes over control, and if I have to install a third instance of ServiceMix it would be easy to do so.

What I'm planning on installing and using is basically : Camel (with Jetty extension), ActiveMQ, Karaf, hawt.io and webconsole.

So basically what I want to do is to have the same bundles in both OSGis, same configuration for both instances, when I change something on one it gets propagated to the second.

Any Idea on how I could get that done? Thank you in advance.


Solution

  • You have to experiment a bit, but I think it is a reachable task. First of all for the propagation Task you'll need to use the Apache Karaf Cellar clustering solution, it will help you propagate all your changes throughout your Cluster-Group. Second you'll need to configure a fail-over mechanism as described in the documentation. For this you most likely need to switch to Container-level locking. The crucial part is to make sure all your own bundles aren't stopped while the Karaf Cellar ones are already working. You might need to tweak the startlevels for your own apps and the default startlevel a bit.