Search code examples
apacheweb-servicescluster-computingload-balancingapache-servicemix

Clustering in ServiceMix 4


I'm trying to configure Apache ServiceMix 4 to provide load balancing feature mentioned in it's documentation (for example here: http://servicemix.apache.org/clustering.html). Although it's mentioned, I couldn't find the exact way how to do it.

The idea is to have 2 ServiceMixes (in LAN, for example) with the same OSGi service installed in them. When client tries to use the service, the load balancer takes him to appropriate service instance on one of the ServiceMixes.

Is there an easy way to do that?


Solution

  • 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 client will then load balance between the active nodes that provides the service. So if you have 5 nodes, then it balance among those. If one of the nodes dies or is stopped etc, then it just balance between the 4 still active nodes. So the solution is fully elastic and scalable.

    The principle is illustrated in the image below:

    enter image description here