httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Galić <i.ga...@brainsware.org>
Subject Re: [users@httpd] mod_proxy_balancer - no way to name pool members by IP.
Date Fri, 04 Feb 2011 16:23:32 GMT

----- dfw-apache@white.u-net.com wrote:

> On Thu, Feb 03, 2011 at 11:00:25PM +0000, Igor Gali?? wrote:
> > ----- dfw-apache@white.u-net.com wrote:
> > > I've hit a vexing impasse with mod_proxy_balancer.
> > > 
> > > I have a pool of backend boxes. They vhost many domains, so
> > > need the specific Host: header in requests to them (the *same*
> > > Host: header for all of them)
> > > 
> > > I proxy requests to them potentially thousands of times a second, 
>  
> > > and their IP's are not going to be changing, so I name the
> > > BalancerMembers by IP address, as the DNS lookup overhead is 
> > > a fatal waste of CPU, especially if your DNS servers melt
> > > and your site dies unnecessarily. (No, /etc/hosts is not
> possible.
> > 
> > http://httpd.apache.org/docs/current/mod/mod_proxy.html#startup
> 
> That only mentions ProxyBlock. We do not use ProxyBlock. Also, when
> we
> lost DNS, we lost the site, so reality has the last word regardless.

duh. Sorry, must've been late yesternight, I didn't give it my full
attention.

> > > The sitename has multiple A records, and I make the backends
> choose
> > > individualiseable vhosts. Besides, my hosts file is vast!)
> > > 
> > > Unfortunately, when I try and use mod_headers to set the Host:
> header
> > > for these backend connections, the balancer layer destroys the
> > > result and replaces it with the IP.
> > > 
> > > Apparently, if I switch ProxyPreserveHost on, I may get further,
> > > but since that's a site-wide setting a side effect would mean all
> > 
> > Not quite sure what you mean by site-wide, but:
> >
> http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypreservehost
> > says: Context:	server config, virtual host

In trunk proxypreservehost can be put in *any* context.

> > But ProxySet only allows you to set the same Variables as
> > ProxyPass does. host is none of them.
> 
> Indeed. This appears to be the problem. Such an option is missing.

Right now I'm looking into 2.2's source to see how to add an option
preservehost=(on|off).

Can you please test:
http://people.apache.org/~igalic/patches/mod_proxy-preserve_host.diff

duh.. nodocumentationpatch!
But I'm pretty sure you can guess how to use it ;)

> DFW

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.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


Mime
View raw message