-
1. Re: Fabric load balancing endpoint?
davsclaus May 28, 2012 4:47 AM (in response to jrawlings1980)Hi
We got some community documentation as well, you may try to look there as well. Until the other docs get improved.
http://fuse.fusesource.org/fabric/docs/user-guide.html#CXF_Fabric
-
2. Re: Fabric load balancing endpoint?
davsclaus May 28, 2012 4:53 AM (in response to jrawlings1980)I logged a JIRA to improve the docs
-
3. Re: Fabric load balancing endpoint?
jrawlings1980 May 28, 2012 5:39 AM (in response to davsclaus)Thanks.
I guess I can create the client, deploy it and do a cxf:list-endpoints to find out.
What would be really useful is a load balancing client example / archetype.
-
4. Re: Fabric load balancing endpoint?
davsclaus May 28, 2012 8:33 AM (in response to jrawlings1980)Yeah we will work on more fabric related examples, screencasts, docs, and whatnot.
-
5. Re: Fabric load balancing endpoint?
jrawlings1980 May 28, 2012 2:34 PM (in response to davsclaus)Thanks. I think I have it worked out.
I'm creating a camelContext route that will reference the ClientProxyBeanID from the client configuration. I think this will then look up in the Fabric registry a WS server endpoint to hit.
I have one more question with the serviceClass in client configuration but will start a new thread.
-
6. Re: Fabric load balancing endpoint?
jrawlings1980 May 29, 2012 4:44 PM (in response to davsclaus)Hi Claus, thanks for your replies. Until the documentation and examples are available around Fabric load balancing is there any chance you or someone who is familiar could please take a look over my other thread please? http://fusesource.com/forums/thread.jspa?threadID=3946&tstart=0
So far I've spent a lot of time trying to get the Fabric load balancer to work but I'm not having any success. I'm sure I'm not that far away.
-
7. Re: Fabric load balancing endpoint?
njiang May 29, 2012 9:48 PM (in response to jrawlings1980)If your two CXF server is configured with right org.fusesource.fabric.cxf.FabricLoadBalancerFeature, which will publish the address of servers to the locator. No matter the address is start with different port or IP address.
Your client will talk to the locator first to get the real server address to use.
-
8. Re: Fabric load balancing endpoint?
jrawlings1980 May 30, 2012 3:11 AM (in response to njiang)Ok many thanks. It does look like the endpoints are registered in the locator. I get the following debug message where inbox/lb is where I've configured the fabricLoadBalancerFeature fabricPath.
DEBUG | evel-EventThread | ZooKeeperTreeTracker | 45 - org.fusesource.fabric.fabric-linkedin-zookeeper - 7.0.0.fuse-061 | [/fabric/cxf/endpoints/inbox/lb/00000000007] [ZooKeeperTreeTracker@1e566f3] [Thread[FelixStartLevel-EventThread,5,main]] start tracking leaf node zkTxId=4900
I believe my problem is with the client. I'm not sure I have configured it correctly. Would you mind taking a quick look at this thread please?
-
9. Re: Fabric load balancing endpoint?
jrawlings1980 Jun 12, 2012 7:11 AM (in response to jrawlings1980)I have just looked back over these post and it is still a valid question. It is very confusing how the Fabric load balance client should be configured.
Also, can you use the Fabric LB with Jetty endpoints or does everything have to be CXF endpoints? How would the load balancing work with a jetty proxy sitting in front of the application?
-
10. Re: Fabric load balancing endpoint?
njiang Jun 13, 2012 11:39 PM (in response to jrawlings1980)First you should go through the difference between the Fabric LB of Camel and Fabric LB of CXF. They are not related unless you are using camel-cxf endpoint to combine them together.
For the Fabric LB, you should let Fabric know the what's the real server address, that is why we need to install the LB feature of the server, and the client should talk to LB before get touch with the real back end server (CXF client need the LB feature which talks to the LB registry to get the real server address)
I don't what Client are you using.
If you are using Fabric LB for Camel you may set up your own camel route (jetty proxy), but CXF client can still not talk it, as Fabric LB CXF feature doesn't provides the address for jetty proxy.
Willem
-
11. Re: Fabric load balancing endpoint?
wbailey Jun 14, 2012 4:53 AM (in response to njiang)Just to confirm my understanding of this, the fabric LB feature is essentially a 'registry' which allows a jaxws client to discover which containers provide a jaxws service. It is dynamic in the way that new containers can be added to the fabric and used by the jaxws client without modifying the client code, but it doesn't balance traffic in the same way as a HTTP load balancer would?
The camel LB feature allows you to route http requests between the same endpoint on different servers , however to add a new server requires the camel route to be updated. This is similar to how a standalone HTTP load balancer would work, i.e it knows where the servers are located and balances traffic between them.
-
12. Re: Fabric load balancing endpoint?
davsclaus Jun 14, 2012 9:34 AM (in response to wbailey)The Fabric Camel LB works with any kind of Camel endpoints, just that using http makes the most sense as an example.
And no, its fully dynamic and discoverable. So you can add/remove servers on the fly, and the LB will balance between the active nodes.
-
13. Re: Fabric load balancing endpoint?
wbailey Jun 14, 2012 11:51 AM (in response to davsclaus)I can't seem register a fabric camel endpoint though, I've tried but I end up the following exception:
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route[[From[fabric:simpleService:jetty:http://0.0.0.0:8185/s... because of Failed to resolve endpoint: fabric://simpleService:jetty:http://0.0.0.0:8185/simple-service due to: Cannot auto create component: fabric ... 30 more Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: fabric://simpleService:jetty:http://0.0.0.0:8185/simple-service due to: Cannot auto create component: fabric at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:461) ... 45 more Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create component: fabric at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:319) ... 53 more Caused by: org.apache.camel.RuntimeCamelException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'zkClient' could be found at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1253) ... 54 more Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'zkClient' could be found at org.apache.aries.blueprint.container.DependencyGraph.getSortedRecipes(DependencyGraph.java:51) ... 59 more
Which seems to be the same problem reported here: http://fusesource.com/issues/browse/FABRIC-10
I have the following features configured in my profile:
fabric-commands
camel-blueprint
jetty
fabric-dosgi
fabric-configadmin
fabric-core
fabric-camel
camel-jetty
fabric-cxf
Am I missing any?
Edited by: warrenbailey on Jun 14, 2012 3:50 PM
-
14. Re: Fabric load balancing endpoint?
davsclaus Jun 14, 2012 2:42 PM (in response to wbailey)Hi
There is a camel fabric cluster example that uses the camel fabric component.
You need to reference the zkClient, as shown below:
There may be a way of improving this so it can be auto discovered. Let me log a ticket to see if we can do that in a future release.