Spaniard89
Spaniard89

Reputation: 2419

Load balancing using Apache camel

I want to have a load balancing system, which has quite a huge list of requirements. I have a set of backend servers and set of clients. The client are running on a different machine and so are the servers. I would like to design a load balancing system which would get the request from client and distribute it among the servers.

Somewhere in my mind i have a weird feeling that i could use camel to set it up. But I have few issues with that, I have a huge XML file that would have the list of backend server and their descriptions such as name, the type of service they provide etc.

Now if I use camel, how would I compare the request from client with this XML file at load balancer? The request of the client also contains the type of service it would need. I know I can use XPAth or XQuery to sort the result, but is there a good example in camel that would be start point for me to start. I have already read the book Camel in action, but it does not explains in detail about load balancing in camel.

Any help and suggestions would be very much appreciated.

Upvotes: 2

Views: 1092

Answers (2)

Ben ODay
Ben ODay

Reputation: 21005

you can use a custom class with camel-loadbalancer to perform the XML processing, client request mapping, etc.

see this unit test for an example...

https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/CustomLoadBalanceTest.java

Upvotes: 1

Germann Arlington
Germann Arlington

Reputation: 3353

AFAIK load-balancing is used to distribute uniform (identical type) load between identical servers.
It looks like you need a distributed computing model (maybe with load-balancing).

Upvotes: 0

Related Questions