Re: mod_proxy_hcheck response timeout?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

On Thu, Apr 22, 2021 at 3:50 PM Daniel Ferradal <dferradal@xxxxxxxxxx> wrote:
>
> Hello,
>
> I'm trying to examine a case in which we want a balancer member to be
> set on fail if it can't responde in specific time to the hcheck
> request
>
> This example configuration:
>
> <Proxy balancer://appbalancer>
> # example member 1
> BalancerMember http://ip:port/ hcmethod=HEAD hcuri=/ping hcpasses=1
> hcfails=1 hcinterval=5 timeout=5 retry=30
>
> # more realistic example member 2 and others
> BalancerMember http://ip:port/ hcmethod=HEAD hcuri=/ping hcpasses=1
> hcfails=1 hcinterval=5 timeout=60 retry=30
>
> BalancerMember http://ip:port/ hcmethod=HEAD hcuri=/ping hcpasses=1
> hcfails=1 hcinterval=5 timeout=60 retry=30
>
> BalancerMember http://ip:port/ hcmethod=HEAD hcuri=/ping hcpasses=1
> hcfails=1 hcinterval=5 timeout=60 retry=30
>
> BalancerMember http://ip:port/ hcmethod=HEAD hcuri=/ping hcpasses=1
> hcfails=1 hcinterval=5 timeout=60 retry=30
> </Proxy>
>
> ProxyPass /app balancer://appbalancer/app failontimeout=on
>
> Let's assume the backend server 1 takes more than 5 seconds for the
> /ping  I would want to be set on fail and the Apache httpd server use
> the other balancermember, if there are more members in the balancer,
> for httpd to choose those other members which respond to the ping in a
> timely fashion, but in my tests, if /ping reply goes above 5 seconds,
> mod_proxy_hcheck is still saying it is ok.
>
> Is my approach correct? As with most initial approaches to a specific
> scenario, this may very well be the case... still bear with me.
>
> Right now if the backend responds to the /ping in for example, 6
> seconds, it is not being marked on fail, so as I understand any normal
> request which lasts more than 5 seconds will, I don´t need hcheck for
> that but this is just an example, there may be other more real
> scenarios like the other members I have defined
>
> for example  Balancermember 2 we set timeout 60 seconds, app takes up
> to 30-40 seconds to reply to specific requests  but suppose we have
> plenty of balancer members and may want to disable the member when it
> degrades the /ping reply to more than 10 seconds because that means it
> is getting degraded.
>
> Is it possible to set a timeout for hchecks to set a member as failed?
>
> Is my approach correct? As with most initial approaches to a specific
> scenario, this may very well be the case, which other approach do you
> suggest?
>

I quickly did a small test where I purposefully made a JSP page slower
than mod_proxy timeout value by using Thread.sleep(). Then used that
JSP in my hcuri. It looks like mod_proxy_hcheck is not using/affected
by the timeout setting - just like you found. So it looks like the
health check module does not have any timeout setting.

What I found is that if I can generate an exception(say
timeoutexception) after waiting for some time then the health check is
failing properly and marking the worker as down. This could be the
alternative option until the health check module is enhanced.

> I check there is a change coming to mod_proxy_hcheck,
> https://svn.apache.org/viewvc?view=revision&revision=1887119, not sure
> if it applies to my case as it does not seem to mention response
> timeout, rather than checks piling up.
>
>
> Thanks in advance
>
>
>
> --
> Daniel Ferradal
> HTTPD Project
> #httpd help at Freenode
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux