[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-users
Subject:    [users@httpd] Proxy issue
From:       Niranjan Rao <nhrdls () gmail ! com>
Date:       2020-08-28 21:09:24
Message-ID: f889bc24-5784-7bdf-13a4-5c2c4d8c0c15 () gmail ! com
[Download RAW message or body]

Greetings


Apache 2,4.29 on Ubuntu 18.04.

I had some trouble with proxy settings and struggled with it for two 
days. Enabled trace5 level logging and finally got the source tarball 
for my version and reasoned out the log entries to figure out the issue. 
Now I am trying to understand whether my understanding of documentation 
is wrong or documentation is confusing. Looking at the documentation at 
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass

I needed to have sticky session and had following as original config. 
This worked as expected.

<Proxy "balancer://intercluster" >

        BalancerMember "ajp://someone:7573" route=app253
        BalancerMember "ajp://otherone:7573" route=app128
        ProxySet stickysession=JSESSIONID
</Proxy>

So I added growth parameter to proxy and all the hell broke loose. 
Despite of sticky session each server was getting random requests. This 
was even more confusing because log entries said it found correct route 
but byrequest handler was picking worker with different route and even 
setting BALANCER_ROUTE_CHANGED as it could be seen in the log file.

<Proxy "balancer://intercluster" growth=5>
        BalancerMember "ajp://someone:7573" route=app253
        BalancerMember "ajp://otherone:7573" route=app128
        ProxySet stickysession=JSESSIONID
</Proxy>

Ultimately right combination turned out to be. Seems like  once you 
define growth param (could be only this one or gets affected by others), 
ProxySet flag stopped working. I did reason it out based on logs and 
looking at the method proxy_balancer_pre_request from 
mod_proxy_balancer.c when worker will not be set.

<Proxy "balancer://intercluster" growth=5 stickysession=JSESSIONID >
        BalancerMember "ajp://someone:7573" route=app253
        BalancerMember "ajp://otherone:7573" route=app128
</Proxy>


Did I misunderstand document or does document need to be changed? Above 
documentation link does have examples for ProxySet but it was not clear 
to me behavior or routing changes based on how parameter is set.


Regards,


Niranjan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic