Clustering in ServiceMix 4

I am trying to configure Apache ServiceMix 4 to provide the load balancing function mentioned in the documentation (for example, here: http://servicemix.apache.org/clustering.html ), Although he mentioned, I could not find the exact way to do this .

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

Is there an easy way to do this?

+4
source share
3 answers

Fabric8 ( http://fabric8.io/ ) can perform Karaf / ServiceMix clustering and much more out of the box. It also has optional Camel cluster components, such as master endpoints and fabrics.

There is an example with a clustered camel, which shows that

Then, the client will load the balance between the active nodes that provide the service. So, if you have 5 nodes, then this is the balance between them. If one of the nodes dies or stops, etc., Then it simply balances between the 4 still active nodes. Thus, the solution is fully flexible and scalable.

The principle is shown in the image below:

enter image description here

+4
source

I have no experience working with Distributed OSGi, so I will only talk about clustering solutions based on JMS.

Here is a good example of a ServiceMix 4 JBI cluster (and please believe it that you need to disable cable subscriptions ...): http://trenaman.blogspot.com/2010/04/four-things-you-need-to- know-about-new.html

And this is also important: trenaman.blogspot.com/2009/03/new-jms-flow-in-servicemix-4.html

The name "JBI Cluster" suggests that you should use this mechanism to cluster your application, but in most cases it is better to use simple JMS endpoints for clustering functionality. This is especially true if you can completely avoid the JBI.

+2
source

I have not reached this phase of my project, so I have no experience with it; but Karaf has a Cellar subproject that is designed around distributed OSGi.

0
source

Source: https://habr.com/ru/post/1310894/


All Articles