You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tushar Chavan <tu...@hotmail.com> on 2011/03/22 18:24:32 UTC

[users@httpd] How to define Lbfactor in case of lbmethod = byrequests & lbmethod = bytraffic

Hi  Experts,
We are setting up load balacing with Apache
Apache will pass request to servers A & B.

Now if I choose lbmethod=byrequest or bytraffic, how I will set lbfactor?
How Apache server will come to know how much request to pass to server A & server B?
Best Regards,Tushar
 		 	   		  

Re: [users@httpd] How to define Lbfactor in case of lbmethod = byrequests & lbmethod = bytraffic

Posted by Mark Montague <ma...@catseye.org>.
  On March 27, 2011 15:09 , Tushar Chavan <tu...@hotmail.com> 
wrote:
> Which is the default algorithm for load balancing ?

Please do read the documentation before sending these questions 
worldwide to everyone on the mailing list.

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass

Which says, "Default is |byrequests|."

--
   Mark Montague
   mark@catseye.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] How to define Lbfactor in case of lbmethod = byrequests & lbmethod = bytraffic

Posted by Tushar Chavan <tu...@hotmail.com>.
Hi Mark,
Thanks for useful information.
One more query .
Which is the default algorithm for load balancing ?
Best Regards,Tushar

Date: Thu, 24 Mar 2011 04:28:16 -0400
From: mark@catseye.org
To: users@httpd.apache.org
CC: tushar.chavan@hotmail.com
Subject: Re: FW: [users@httpd] How to define Lbfactor  in case of  lbmethod = byrequests & lbmethod = bytraffic



  


    
  
  
    On March 24, 2011 4:25 , Mark Montague <ma...@catseye.org>
    wrote:
    
      
      By doing weighted request counting.  In the following example, for
      each three requests, one request will be sent to 1.2.3.4:8009 and
      three requests will be sent to 1.2.3.5:8009.  Apache HTTP Server
      keeps track internally of how many requests have been sent to each
      balance member, and uses that information plus the loadfactor
      parameter the BalanceMember directive to determine to which server
      to send the next request to.

      

      
      ProxyPass / balancer://mycluster/ 

        <Proxy balancer://mycluster>

            BalancerMember ajp://1.2.3.4:8009
          loadfactor=1

              BalancerMember ajp://1.2.3.5:8009 loadfactor=2

              ProxySet lbmethod=byrequest

        </Proxy>

    
    

    Apologies for the typographical error in my answer above.  The
    second sentence should of course read, "In the following example,
    for each three requests, ONE request will be sent to 1.2.3.4:8009
    and TWO requests will be sent to 1.2.3.5:8009"
    --
  Mark Montague
  mark@catseye.org 		 	   		  

RE: [users@httpd] How to define Lbfactor in case of lbmethod = byrequests & lbmethod = bytraffic

Posted by Tushar Chavan <tu...@hotmail.com>.
Thanks Mark.

Date: Thu, 24 Mar 2011 04:28:16 -0400
From: mark@catseye.org
To: users@httpd.apache.org
CC: tushar.chavan@hotmail.com
Subject: Re: FW: [users@httpd] How to define Lbfactor  in case of  lbmethod = byrequests & lbmethod = bytraffic



  


    
  
  
    On March 24, 2011 4:25 , Mark Montague <ma...@catseye.org>
    wrote:
    
      
      By doing weighted request counting.  In the following example, for
      each three requests, one request will be sent to 1.2.3.4:8009 and
      three requests will be sent to 1.2.3.5:8009.  Apache HTTP Server
      keeps track internally of how many requests have been sent to each
      balance member, and uses that information plus the loadfactor
      parameter the BalanceMember directive to determine to which server
      to send the next request to.

      

      
      ProxyPass / balancer://mycluster/ 

        <Proxy balancer://mycluster>

            BalancerMember ajp://1.2.3.4:8009
          loadfactor=1

              BalancerMember ajp://1.2.3.5:8009 loadfactor=2

              ProxySet lbmethod=byrequest

        </Proxy>

    
    

    Apologies for the typographical error in my answer above.  The
    second sentence should of course read, "In the following example,
    for each three requests, ONE request will be sent to 1.2.3.4:8009
    and TWO requests will be sent to 1.2.3.5:8009"
    --
  Mark Montague
  mark@catseye.org 		 	   		  

Re: FW: [users@httpd] How to define Lbfactor in case of lbmethod = byrequests & lbmethod = bytraffic

Posted by Mark Montague <ma...@catseye.org>.
  On March 24, 2011 4:25 , Mark Montague <ma...@catseye.org>  wrote:
> By doing weighted request counting.  In the following example, for 
> each three requests, one request will be sent to 1.2.3.4:8009 and 
> three requests will be sent to 1.2.3.5:8009.  Apache HTTP Server keeps 
> track internally of how many requests have been sent to each balance 
> member, and uses that information plus the loadfactor parameter the 
> BalanceMember directive to determine to which server to send the next 
> request to.
>
> |ProxyPass / balancer://mycluster/
> <Proxy balancer://mycluster>
> BalancerMember ajp://1.2.3.4:8009 loadfactor=1
>     BalancerMember ajp://1.2.3.5:8009 loadfactor=2
>     ProxySet lbmethod=byrequest
> </Proxy>|

Apologies for the typographical error in my answer above.  The second 
sentence should of course read, "In the following example, for each 
three requests, ONE request will be sent to 1.2.3.4:8009 and TWO 
requests will be sent to 1.2.3.5:8009"

--
   Mark Montague
   mark@catseye.org


Re: FW: [users@httpd] How to define Lbfactor in case of lbmethod = byrequests & lbmethod = bytraffic

Posted by Mark Montague <ma...@catseye.org>.
  On March 24, 2011 4:09 , Tushar Chavan <tu...@hotmail.com> wrote:
> Suppose if choose , lbmethod = bytraffic , then how Apache will come 
> to know that how much traffic it should pass to server A & B.

By doing weighted byte counting.


> Also same with bmethod=byrequest. , how Apache will come to know that 
> how many request it should pass to server A & B.

By doing weighted request counting.  In the following example, for each 
three requests, one request will be sent to 1.2.3.4:8009 and three 
requests will be sent to 1.2.3.5:8009.  Apache HTTP Server keeps track 
internally of how many requests have been sent to each balance member, 
and uses that information plus the loadfactor parameter the 
BalanceMember directive to determine to which server to send the next 
request to.

|ProxyPass / balancer://mycluster/
<Proxy balancer://mycluster>
BalancerMember ajp://1.2.3.4:8009 loadfactor=1
     BalancerMember ajp://1.2.3.5:8009 loadfactor=2
     ProxySet lbmethod=byrequest
</Proxy>


|lbmehtod=bytraffic works a similar way, but it counts bytes instead of 
counting requests.

See http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass for 
more information.

Or am I misunderstanding your question?

--
   Mark Montague
   mark@catseye.org


FW: [users@httpd] How to define Lbfactor in case of lbmethod = byrequests & lbmethod = bytraffic

Posted by Tushar Chavan <tu...@hotmail.com>.
Hi Experts,
Suppose if choose , lbmethod = bytraffic , then how Apache will come to know that how much traffic it should pass to server A & B.
Also same with bmethod=byrequest. , how Apache will come to know that how many request it should pass to server A & B.
Best Regards,Tushar.

From: tushar.chavan@hotmail.com
To: users@httpd.apache.org
Date: Tue, 22 Mar 2011 22:54:32 +0530
Subject: [users@httpd] How to define Lbfactor  in case of  lbmethod = byrequests & lbmethod = bytraffic








Hi  Experts,
We are setting up load balacing with Apache
Apache will pass request to servers A & B.

Now if I choose lbmethod=byrequest or bytraffic, how I will set lbfactor?
How Apache server will come to know how much request to pass to server A & server B?
Best Regards,Tushar
 		 	   		  

RE: [users@httpd] How to define Lbfactor in case of lbmethod = byrequests & lbmethod = bytraffic

Posted by Tushar Chavan <tu...@hotmail.com>.
Hi,
 
But if there are two machines A & B. How Apache will come to know which one is stronger? 
Do we need to define it somewhere?
 
Best Regards,
Tushar

 


Date: Wed, 23 Mar 2011 10:27:54 +1100
From: icicimov@gmail.com
To: users@httpd.apache.org
Subject: Re: [users@httpd] How to define Lbfactor in case of lbmethod = byrequests & lbmethod = bytraffic

i don't think lbfactor is related to the method but more to the servers hardware:

lbfactor - weighed-round-robin load balancing where high lbfactor means stronger machine (that is going to handle more requests) 

so if A and B are identical in terms of hardware you use same lbfactor


On Wed, Mar 23, 2011 at 4:24 AM, Tushar Chavan <tu...@hotmail.com> wrote:


Hi  Experts,


We are setting up load balacing with Apache


Apache will pass request to servers A & B.



Now if I choose lbmethod=byrequest or bytraffic, how I will set lbfactor?


How Apache server will come to know how much request to pass to server A & server B?


Best Regards,
Tushar


 		 	   		  

Re: [users@httpd] How to define Lbfactor in case of lbmethod = byrequests & lbmethod = bytraffic

Posted by Igor Cicimov <ic...@gmail.com>.
i don't think lbfactor is related to the method but more to the servers
hardware:

lbfactor - weighed-round-robin load balancing where high lbfactor means
stronger machine (that is going to handle more requests)

so if A and B are identical in terms of hardware you use same lbfactor

On Wed, Mar 23, 2011 at 4:24 AM, Tushar Chavan <tu...@hotmail.com>wrote:

>  Hi  Experts,
>
> We are setting up load balacing with Apache
>
> Apache will pass request to servers A & B.
>
> Now if I choose lbmethod=byrequest or bytraffic, how I will set lbfactor?
>
> How Apache server will come to know how much request to pass to server A &
> server B?
>
> Best Regards,
> Tushar
>
>