How do I cluster ServiceMix?
Asked Answered
R

3

9

I am looking for some initial pointers on how to cluster a ServiceMix solution. Basically what I need is:

  • having 2 (or more) ServiceMix instances serving my routing needs and sharing the load
  • if one instance fails, other(s) continue to serve
  • if the failed one is brought back to life, it joins the party

Searching for information confuses me since

My solution will probably have a few bundles that communicate with each other using JMS queues. Should I in that case just have 2 independent ServiceMix instances (who do not know of each other). Wouldn't that be the simplest option? I see some support for a failover configuration (http://servicemix.apache.org/docs/4.5.x/users-guide/failover.html) but what benefits would that really give (am I missing something)? Also this failover configuration does not help with load balancing since just one instance is serving requests.

Rube answered 3/6, 2013 at 11:51 Comment(0)
C
5

From what it sounds like, all you need is two ServiceMix instances running side by side with no failover specifically configured. Failover is there if you want a cluster of instances, only one of which services requests.

Ignore the JBI stuff - it's legacy. Distributed OSGi is a red herring in the use case that you have described.

As boday suggests, Cellar is used to manage the installation of your bundles uniformly across a logical group of Karaf/ServiceMix instances, so you can manage them from one location as opposed to installing new versions on each instance by hand.

Creativity answered 5/6, 2013 at 10:32 Comment(2)
Thank you. Do I understand correctly - using Cellar does not mean I have to get into DOSGi or care about it much? It would just help me in the deployment? And if I don't mind a little extra work, I can forget abut Cellar as well and just deploy updated versions on each instance by hand?Rube
That's right. Please remember to vote up if this has been useful.Creativity
P
2

Fabric8 (http://fabric8.io/) can do Karaf/ServiceMix clustering and much more out of the box. It also have additional clustered Camel components such as the master and fabric endpoints

There is a clustered Camel example, that demonstrates that

The principle is illustrated in the image below:

enter image description here

Phosphor answered 3/9, 2014 at 8:4 Comment(0)
T
0

take a look at Apache Cellar as its targeted at these use cases...

http://karaf.apache.org/index/subprojects/cellar.html

Thermomagnetic answered 3/6, 2013 at 18:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.