You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2017/05/31 17:33:59 UTC
[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@httpd.apache.org
Reporter: jim@riggs.me
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 61140] Add hot spares to load balancers
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61140
Jim Riggs <ji...@riggs.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35022|0 |1
is obsolete| |
--- Comment #3 from Jim Riggs <ji...@riggs.me> ---
Created attachment 35023
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35023&action=edit
patch v3
Grr...missed the prototype.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 61140] Add hot spares to load balancers
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61140
Jim Riggs <ji...@riggs.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35023|0 |1
is obsolete| |
--- Comment #4 from Jim Riggs <ji...@riggs.me> ---
Created attachment 35024
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35024&action=edit
callback patch
- use a callback and baton to the lbmethod in
ap_proxy_balancer_get_best_worker() (previously
ap_proxy_balancer_usable_workers()) so that we can find the best worker in
flight while iterating rather than returning an array of usable workers that
has to then in turn be iterated
- consider a draining worker unusable and suitable for replacement by a spare
(I continue to push these to my fork on github, so visual diff/PR can still be
seen @ https://github.com/jhriggs/httpd/pull/1/files.)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 61140] Add hot spares to load balancers
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61140
Jim Riggs <ji...@riggs.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35021|0 |1
is obsolete| |
--- Comment #2 from Jim Riggs <ji...@riggs.me> ---
Created attachment 35022
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35022&action=edit
patch v2
Fix superfluous ap_proxy_retry_worker_fn
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 61140] Add hot spares to load balancers
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61140
Jim Riggs <ji...@riggs.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35024|0 |1
is obsolete| |
--- Comment #5 from Jim Riggs <ji...@riggs.me> ---
Created attachment 35025
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35025&action=edit
callback patch v2
Previous callback patch was mistakenly not against trunk.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 61140] Add hot spares to load balancers
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61140
--- Comment #1 from Jim Riggs <ji...@riggs.me> ---
Created attachment 35021
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35021&action=edit
hot spare functionality
For those who like to see a Github-type view, see
https://github.com/jhriggs/httpd/pull/1/files.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 61140] Add hot spares to load balancers
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61140
Jim Riggs <jh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Jim Riggs <jh...@apache.org> ---
Committed to trunk (https://svn.apache.org/r1828890) and proposed for backport
to 2.4 (https://svn.apache.org/r1828893).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org