You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andy Davidson <an...@nosignal.org> on 2007/05/11 13:53:16 UTC

[users@httpd] Apache 2.2 and proxy_balancer - tcp session pipelining

Hi,

I first posted this question to comp.infosystems.www.servers.unix but  
had no response.

mod_proxy_balancer is cool - I like this, guys, thank you.

I want to load balance a number of back-end worker/target servers  
that host one web application.  This is easy to do :

         <Proxy balancer://mysite>
                 Order allow,deny
                 Allow from all
                 BalancerMember http://10.1.2.3:80
                 BalancerMember http://10.1.2.4:80
         </Proxy>
         ProxyPass /r balancer://mysite/
         ProxyPassReverse /r balancer://mysite/

Now, what I want to do this time is configure my reverse proxy server  
to open several connections to each of the back end worker servers  
when the proxy starts to my back end hosts so that the tcp session  
can be pipelined, thus preventing the burden of creating and tearing  
down tcp sessions on the back end boxes for new visitor requests.

I found some documentation on the httpd.apache.org website which  
seemed to describe what I want to do :

Parameter Default       Description
min       0             Minumum number of connections
                that will always be open to the backend server.
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

However, this doesn't cleanly map on to the balancer model. If I add  
'min=4' to the BalancerMember line this is ignored, and if I add the  
same to the 'ProxyPass' lines, apache does not understand the  
configuration.


Anyone thought of a way around this ?  Is it a feature request ?

TIA




-- 
Andy Davidson - ( http://www.andyd.net/ )


---------------------------------------------------------------------
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] Apache 2.2 and proxy_balancer - tcp session pipelining

Posted by Ryan Murray <ry...@elementn.com>.
 
Hi Andy

> Hi, Ryan
> 
> On 11 May 2007, at 15:46, Ryan Murray wrote:
> 
> >> Now, what I want to do this time is configure my reverse  proxy 
> >> server to open several connections to each of the back end worker 
> >> servers when the proxy starts to my back end hosts so that the tcp 
> >> session can be pipelined, thus preventing the burden of 
> creating and 
> >> tearing down tcp sessions on the back end boxes for new visitor 
> >> requests.
> > If you are using the preform MPM you have one server 
> process for each 
> > Apache worker.  Therefore each apache worker opens exactly one 
> > connection to the back end so max per worker always == 1 and your
> > "real max" connections to the backend <= number of Apache 
> workers.   
> > With the Prefork MPM, I don't believe there is way to limit 
> the number 
> > of Apache workers which will actually open connections to 
> the backend.
> 
> Thanks for your reply.  What I am looking to do is ensure 
> that a minimum number of connections are always open to the 
> back end web- servers.  This should improve cluster 
> performance at quiet times & service restart.
> 

Well from my experince the MPM prefork MinServers will essentially be your
min number of connections.  I've haven't used a the worker MPM in some time
as I need mod_cache.

I can't say I've ever checked to see if the HTTP connector keeps the
connections open but I know the AJP proxy does.  I was under the impression
that the HTTP connector will also - might you have an issue with the backend
closing the connections rather than Apache?  Could your backend have an
HTTP/1.1 compliance issue? Just throwing out ideas.

Ryan

Ryan 


---------------------------------------------------------------------
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] Apache 2.2 and proxy_balancer - tcp session pipelining

Posted by Andy Davidson <an...@nosignal.org>.
Hi, Ryan

On 11 May 2007, at 15:46, Ryan Murray wrote:

>> Now, what I want to do this time is configure my reverse  proxy  
>> server to open several connections to each of the back end worker  
>> servers when the proxy starts to my back end hosts so that the tcp  
>> session can be pipelined, thus preventing the burden of creating  
>> and tearing down tcp sessions on the back end boxes for new  
>> visitor requests.
> If you are using the preform MPM you have one server process for  
> each Apache worker.  Therefore each apache worker opens exactly one  
> connection to the back end so max per worker always == 1 and your  
> "real max" connections to the backend <= number of Apache workers.   
> With the Prefork MPM, I don't believe there is way to limit the  
> number of Apache workers which will actually open connections to  
> the backend.

Thanks for your reply.  What I am looking to do is ensure that a  
minimum number of connections are always open to the back end web- 
servers.  This should improve cluster performance at quiet times &  
service restart.



---------------------------------------------------------------------
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


[users@httpd] RE: [Bulk] [users@httpd] Apache 2.2 and proxy_balancer - tcp session pipelining

Posted by Ryan Murray <ry...@elementn.com>.
> -----Original Message-----
> From: Andy Davidson [mailto:andy@nosignal.org] 
> Sent: Friday, May 11, 2007 2:53 PM
> To: users@httpd.apache.org
> Subject: [Bulk] [users@httpd] Apache 2.2 and proxy_balancer - 
> tcp session pipelining
> 
> 
> Hi,
> 
> I first posted this question to 
> comp.infosystems.www.servers.unix but had no response.
> 
> mod_proxy_balancer is cool - I like this, guys, thank you.
> 
> I want to load balance a number of back-end worker/target 
> servers that host one web application.  This is easy to do :
> 
>          <Proxy balancer://mysite>
>                  Order allow,deny
>                  Allow from all
>                  BalancerMember http://10.1.2.3:80
>                  BalancerMember http://10.1.2.4:80
>          </Proxy>
>          ProxyPass /r balancer://mysite/
>          ProxyPassReverse /r balancer://mysite/
> 
> Now, what I want to do this time is configure my reverse 
> proxy server to open several connections to each of the back 
> end worker servers when the proxy starts to my back end hosts 
> so that the tcp session can be pipelined, thus preventing the 
> burden of creating and tearing down tcp sessions on the back 
> end boxes for new visitor requests.
> 
> I found some documentation on the httpd.apache.org website 
> which seemed to describe what I want to do :
> 
> Parameter Default       Description
> min       0             Minumum number of connections
>                 that will always be open to the backend server.
> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
> 
> However, this doesn't cleanly map on to the balancer model. 
> If I add 'min=4' to the BalancerMember line this is ignored, 
> and if I add the same to the 'ProxyPass' lines, apache does 
> not understand the configuration.
> 
> 
> Anyone thought of a way around this ?  Is it a feature request ?
> 
> TIA
> 

If you are using the preform MPM you have one server process for each Apache
worker.  Therefore each apache worker opens exactly one connection to the
back end so max per worker always == 1 and your "real max" connections to
the backend <= number of Apache workers.  With the Prefork MPM, I don't
believe there is way to limit the number of Apache workers which will
actually open connections to the backend.

If you want to avoid this issue and limit the conenctions to the backend you
can use the "Worker" MPM which is multithreaded.  In this case the "max" for
the balancer should be respected.

Ryan Murray
 
managing director
element^n

berytech technology centre
mkalles-beirut, lebanon
+961 4 533 040   ext. 3030 (office)
+961 3 767 083   (lebanon mobile)
+973 3603 9118  (bahrain mobile)
 
www.elementn.com
 
This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information.  Any unauthorized review,
use, disclosure, or distribution is prohibited.  If you are not the intended
recipient(s) please contact the sender by reply email and destroy all copies
of the original message and any attachments.


---------------------------------------------------------------------
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