httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [PATCH] Balancers, VirtualHost and ProxyPass
Date Wed, 17 Dec 2014 13:36:23 GMT
As also noted, the whole aspect of using the Balancer Manager
factors into this as well...

IMO, the whole merging stuff is getting more and more
fragile, and adding more to it makes it even worse.

> On Dec 17, 2014, at 2:35 AM, Jan Kaluža <jkaluza@redhat.com> wrote:
> 
> On 12/16/2014 01:57 PM, Jim Jagielski wrote:
>> Isn't this already addressed/handled with the BalancerInherit directive??
> 
> No, it isn't. The BalancerInherit only says that the balancers from the main config will
be copied to vhost context *after* the config_tree is processed. And the word *after* is the
problem here. When you try to use the inherited balancer in the vhost config, you can't, because
vhost does not know about the inherited balancers in the time of config processing.
> 
> Every time you try to use (with ProxyPass for example) inherited balancer in the vhost,
mod_proxy creates brand new balancer in the vhost context. This new balancer is completely
ignored later and replaced by the original balancer you wanted to use when BalancerInherit
is used.
> 
> If we think httpd should not allow ProxyPass in the VirtualHost with balancers defined
outside of VirtualHost context, we should disable that and show warning that httpd doesn't
support this configuration.
> 
> Otherwise we need to add balancer merging as I did in the patch.
> 
> Regards,
> Jan Kaluza
> 
>>> On Dec 10, 2014, at 7:25 AM, Jan Kaluža <jkaluza@redhat.com> wrote:
>>> 
>>> Hi,
>>> 
>>> I've found out that following configuration does not work as expected:
>>> 
>>> <Proxy balancer://a>
>>>   ...
>>> </Proxy>
>>> <VirtualHost *:80>
>>>    ProxyPass / balancer://a stickysession=JSESSIONID|jsessionid
>>> </VirtualHost>
>>> 
>>> In this case, two proxy_balancers are created. The first one in Proxy section
in the main config without stickysession and the second one in the vhost section with stickysession
set.
>>> 
>>> Because of merge_proxy_config behaviour, the one from the main config is always
preferred and therefore you cannot set stickysession (and other options) this way.
>>> 
>>> Attached patch fixes that by changing the merge strategy for balancers array
to merge options set by ProxyPass.
>>> 
>>> I think we would need the same for proxy_worker too, but before I spent afternoon
working on it, I wanted to ask, do you think this is the right way how to fix this?
>>> 
>>> Regards,
>>> Jan Kaluza
>>> <httpd-trunk-balancer-vhost.patch>
>> 
> 


Mime
View raw message