mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Add in a very simple balancer "set" concept, which allows
for members to be assigned to a particular cluster set such that members in lower-numbered sets are checked/used before those in higher ones. Also bundled in this are some HTML cleanups for the balancer manager UI. Sorry for the mixins :) Compiles/builds clean: passes test framework as well as more normal usage tests ;) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427172 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -253,6 +253,12 @@ static const char *set_worker_param(apr_pool_t *p,
|
||||
worker->ping_timeout = apr_time_from_sec(ival);
|
||||
worker->ping_timeout_set = 1;
|
||||
}
|
||||
else if (!strcasecmp(key, "lbset")) {
|
||||
ival = atoi(val);
|
||||
if (ival < 0 || ival > 99)
|
||||
return "lbset must be between 0 and 99";
|
||||
worker->lbset = ival;
|
||||
}
|
||||
else {
|
||||
return "unknown Worker parameter";
|
||||
}
|
||||
@@ -1898,7 +1904,7 @@ static int proxy_status_hook(request_rec *r, int flags)
|
||||
ap_rputs("\n\n<table border=\"0\"><tr>"
|
||||
"<th>Sch</th><th>Host</th><th>Stat</th>"
|
||||
"<th>Route</th><th>Redir</th>"
|
||||
"<th>F</th><th>Acc</th><th>Wr</th><th>Rd</th>"
|
||||
"<th>F</th><th>Set</th><th>Acc</th><th>Wr</th><th>Rd</th>"
|
||||
"</tr>\n", r);
|
||||
|
||||
worker = (proxy_worker *)balancer->workers->elts;
|
||||
@@ -1917,6 +1923,7 @@ static int proxy_status_hook(request_rec *r, int flags)
|
||||
ap_rvputs(r, "</td><td>", worker->s->route, NULL);
|
||||
ap_rvputs(r, "</td><td>", worker->s->redirect, NULL);
|
||||
ap_rprintf(r, "</td><td>%d</td>", worker->s->lbfactor);
|
||||
ap_rprintf(r, "<td>%d</td>", worker->s->lbset);
|
||||
ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td><td>", worker->s->elected);
|
||||
ap_rputs(apr_strfsize(worker->s->transferred, fbuf), r);
|
||||
ap_rputs("</td><td>", r);
|
||||
|
Reference in New Issue
Block a user