camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <ja...@carmanconsulting.com>
Subject Re: LoadBalancing does not increaing performace
Date Fri, 31 Jan 2014 18:11:17 GMT
You're also using "direct" endpoints in your load balancer.  That's
not going to help you, since it'll just stay on the same thread.
Check out my example here and look at the output:

https://github.com/jwcarman/camel-sandbox/blob/master/src/test/java/com/carmanconsulting/sandbox/camel/LoadBalancerTest.java

On my machine:

[                          main] LoadBalancerTest               INFO
Received message Testing 1 on thread main.
[                          main] LoadBalancerTest               INFO
Received message Testing 1 on thread main.
[                          main] LoadBalancerTest               INFO
Received message Testing 2 on thread main.
[                          main] LoadBalancerTest               INFO
Received message Testing 2 on thread main.


On Fri, Jan 31, 2014 at 11:10 AM, Shing Hing Man <matmsh@yahoo.com> wrote:
> Hi,
>
> I am using Camel 2.11  and I have the following route.
>
> from("jetty:http://" + hostURL + "/adtruth?matchOnUriPrefix=true")
> .process(myProcessor);
> where myProcessor just does a http redirect.
>
>
>
> I am trying to increase the throughput of the above route  (to able to handle more messages
per second), by using load balancing round robin :
>
> from("jetty:http://" + hostURL + "/test?matchOnUriPrefix=true")
> .loadBalance().roundRobin()
> .to("direct:worker1")
> .to("direct:worker2")
> .end()
> from("direct:worker1").process(myProcessor);
> from("direct:worker2").process(myProcessor);
>
> From my bench test,  the performance of the round robin route is similar to the earlier
"simple" route.
> I have also tried replacing "direct" with "seda", but  it resulted in worst performance.
>
>
>
> What is wrong with my round robin route ?
>
> Thanks in advance for any assistance !
>
> Shing

Mime
View raw message