osdir.com


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

[Bug 61140] New: Add hot spares to load balancers


https://bz.apache.org/bugzilla/show_bug.cgi?id=61140

            Bug ID: 61140
           Summary: Add hot spares to load balancers
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_proxy_balancer
          Assignee: bugs@xxxxxxxxxxxxxxxx
          Reporter: jim@xxxxxxxx
  Target Milestone: ---

As discussed at ApacheConNA 2017 in Miami a couple of weeks ago and followed up
on the mailing list (http://marc.info/?l=apache-httpd-dev&m=149554902825812),
here is a patch to add a new type/status to balancer members: R - hot spare.
These workers will be treated as drop-in replacements for unusable workers
without all workers needing to be unavailable (as for H - hot standby). This
allows for maintaining a consistent number of available workers in the
balancer.

"Normal" workers always take precedence over spares. For each "normal" worker
that is unusable (failed, stopped, disabled, unreachable, etc.), though, a
spare will be added to the list of available workers to try to maintain the
desired number of members.

The find_best_by(requests|busyness|traffic) functions were 99% duplicated code.
I combined all of that logic into a single ap_proxy_balancer_usable_workers()
function in proxy_util.c. (Is that the best place for it?) That function
contains all of the logic for iterating through lbsets and returning an array
of the available workers that the lbmethod should choose from, whether they be
normal workers, spares, or hot standbys. Thus, the lbmethods only need to worry
about their specific heuristics for choosing the best worker, not determining
which workers are available and which is best.

Balancer-manager management is implemented. AND, I even updated the xml
documentation(!!!).

I did not implement hot spare support in mod_lbmethod_heartbeat, as it seems
all but dead...and maybe should be deprecated and removed due to hcheck? I do
have some code stubs if we really want to add it, though.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: bugs-help@xxxxxxxxxxxxxxxx