git.net

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

Re: svn commit: r1832609 - in /httpd/httpd/branches/2.4.x: ./ docs/manual/howto/ docs/manual/mod/ modules/proxy/ modules/proxy/balancers/


Looks like a good direction. From PR62557, the observed modules to be adjusted, to consume the new opt fn are;

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -423,6 +424,9 @@ SET(mod_http2_extra_sources
   modules/http2/h2_task.c            modules/http2/h2_util.c
   modules/http2/h2_workers.c
 )
+SET(mod_lbmethod_bybusyness_extra_libs   mod_proxy)
+SET(mod_lbmethod_byrequests_extra_libs   mod_proxy)
+SET(mod_lbmethod_bytraffic_extra_libs    mod_proxy)
 SET(mod_ldap_extra_defines           LDAP_DECLARE_EXPORT)
 SET(mod_ldap_extra_libs              wldap32)
 SET(mod_ldap_extra_sources

And this corresponds with


mod_lbmethod_bybusyness.c:        ap_proxy_balancer_get_best_worker(balancer, r, is_best_bybusyness,
mod_lbmethod_byrequests.c:    proxy_worker *worker = ap_proxy_balancer_get_best_worker(balancer, r, is_best_byrequests, &total_factor);
mod_lbmethod_bytraffic.c:    return ap_proxy_balancer_get_best_worker(balancer, r, is_best_bytraffic,


This patch in 62557 can be ignored once the new optional entry point is used instead, and these three modules may be loaded again prior to mod_proxy in httpd.conf.



On Fri, Jul 20, 2018 at 5:13 AM, Ruediger Pluem <rpluem@xxxxxxxxxx> wrote:


On 07/19/2018 08:24 PM, William A Rowe Jr wrote:
> On Thu, May 31, 2018 at 8:24 AM, <jim@xxxxxxxxxx <mailto:jim@xxxxxxxxxx>> wrote:
>
>     Author: jim
>     Date: Thu May 31 13:24:04 2018
>     New Revision: 1832609
>
>     URL: http://svn.apache.org/viewvc?rev=1832609&view=rev <http://svn.apache.org/viewvc?rev=1832609&view=rev>
>     Log:
>     Merge r1828890, r1832500 from trunk:
>
> [...]
>
>     URL:
>     http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_byrequests.c?rev=1832609&r1=1832608&r2=1832609&view=diff
>     <http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_byrequests.c?rev=1832609&r1=1832608&r2=1832609&view=diff>
>     ==============================================================================
>     --- httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_byrequests.c (original)
>     +++ httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_byrequests.c Thu May 31 13:24:04 2018
>
> [...]
>
>     @@ -70,82 +77,17 @@ static int (*ap_proxy_retry_worker_fn)(c
>       *   b a d c d a c d b d ...
>       *
>       */
>     -
>      static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
>                                      request_rec *r)
>      {
>     -    int i;
>          int total_factor = 0;
>
> [...]
>
>     +    proxy_worker *worker = ap_proxy_balancer_get_best_worker(balancer, r, is_best_byrequests, &total_factor);
>
>
> This introduced a new hard runtime config ordering problem on mod_lbmethod_byrequest.so, which must now be loaded AFTER
> mod_proxy.so.
>
> This was not previously true, as illustrated by mod_lbmethod_heartbeat, using the ap_proxy_retry_worker using an
> optional function.
>
> lbmethod sorts before proxy, fwiw.
>

Something like the attached? The mod_lbmethod_byrequests.c part needs to be done for lb modules though.

Regards

Rüdiger