Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7EBD210F43 for ; Fri, 31 Jan 2014 18:12:05 +0000 (UTC) Received: (qmail 89796 invoked by uid 500); 31 Jan 2014 18:12:04 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 89696 invoked by uid 500); 31 Jan 2014 18:12:04 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 89688 invoked by uid 99); 31 Jan 2014 18:12:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jan 2014 18:12:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.217.172] (HELO mail-lb0-f172.google.com) (209.85.217.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jan 2014 18:11:58 +0000 Received: by mail-lb0-f172.google.com with SMTP id c11so3735601lbj.3 for ; Fri, 31 Jan 2014 10:11:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=vOsUqms6Uv54z9Amjc+h1I7q/+MLF1VZJ8XwaGnajzw=; b=Xv+KRwcfTEJJ56Kd1F1Xa8uExExByYfF0oShIIuXFluTzHxSASC98ioLv3nNKXXO1C kpthdy8OHREYLlhthCHC6WZkFOdSl6KFVGmdgYCoEybVji8Wy9z2D7QCtFurAB3OTb9C V3uGXJrI7gH8KvffQwyEjy8jJw4Deo1H3CGV2IJn0zAdvHyEBBWRnxR/P6mIke3Nd6oh H9l/4aBg9ryCle/+NzSGDcfqXoctAcp5O9MBCJwffATKColH/aoVBc5mzBB31I3WsPmm 4plHzoLrMGproClFlsHbK6La//0H3zl3Q0ieZZyQGJqjY2oDSwAAq340PKdnJRUKbEJH vlqQ== X-Gm-Message-State: ALoCoQkRC6TeWA6BQzcO+74lnIkyTDrBz1CGYRCheW7I8LpIf4Fazhz3Y9FPPZhbR19GlgGXsz6/ X-Received: by 10.152.19.200 with SMTP id h8mr33038lae.83.1391191897805; Fri, 31 Jan 2014 10:11:37 -0800 (PST) MIME-Version: 1.0 Sender: jcarman@carmanconsulting.com Received: by 10.112.76.132 with HTTP; Fri, 31 Jan 2014 10:11:17 -0800 (PST) In-Reply-To: <1391184617.33083.YahooMailNeo@web125402.mail.ne1.yahoo.com> References: <1391184617.33083.YahooMailNeo@web125402.mail.ne1.yahoo.com> From: James Carman Date: Fri, 31 Jan 2014 13:11:17 -0500 X-Google-Sender-Auth: pyktyol22xmeLkyGQC1GR7WQa94 Message-ID: Subject: Re: LoadBalancing does not increaing performace To: "users@camel.apache.org" , Shing Hing Man Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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 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