summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/proxy/balancers/mod_lbmethod_bybusyness.c10
-rw-r--r--modules/proxy/balancers/mod_lbmethod_byrequests.c10
-rw-r--r--modules/proxy/balancers/mod_lbmethod_bytraffic.c10
-rw-r--r--modules/proxy/balancers/mod_lbmethod_heartbeat.c10
-rw-r--r--modules/proxy/mod_proxy.h2
-rw-r--r--modules/proxy/proxy_util.c2
6 files changed, 44 insertions, 0 deletions
diff --git a/modules/proxy/balancers/mod_lbmethod_bybusyness.c b/modules/proxy/balancers/mod_lbmethod_bybusyness.c
index 5bdeef7e7d..0e5ebc87a1 100644
--- a/modules/proxy/balancers/mod_lbmethod_bybusyness.c
+++ b/modules/proxy/balancers/mod_lbmethod_bybusyness.c
@@ -105,10 +105,20 @@ static proxy_worker *find_best_bybusyness(proxy_balancer *balancer,
}
+static apr_status_t reset(proxy_balancer *balancer, request_rec *r) {
+ return APR_SUCCESS;
+}
+
+static apr_status_t age(proxy_balancer *balancer, request_rec *r) {
+ return APR_SUCCESS;
+}
+
static const proxy_balancer_method bybusyness =
{
"bybusyness",
&find_best_bybusyness,
+ &reset,
+ &age,
NULL
};
diff --git a/modules/proxy/balancers/mod_lbmethod_byrequests.c b/modules/proxy/balancers/mod_lbmethod_byrequests.c
index f5ff91d014..fc15db6c08 100644
--- a/modules/proxy/balancers/mod_lbmethod_byrequests.c
+++ b/modules/proxy/balancers/mod_lbmethod_byrequests.c
@@ -132,6 +132,14 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
return mycandidate;
}
+static apr_status_t reset(proxy_balancer *balancer, request_rec *r) {
+ return APR_SUCCESS;
+}
+
+static apr_status_t age(proxy_balancer *balancer, request_rec *r) {
+ return APR_SUCCESS;
+}
+
/*
* How to add additional lbmethods:
* 1. Create func which determines "best" candidate worker
@@ -142,6 +150,8 @@ static const proxy_balancer_method byrequests =
{
"byrequests",
&find_best_byrequests,
+ &reset,
+ &age,
NULL
};
diff --git a/modules/proxy/balancers/mod_lbmethod_bytraffic.c b/modules/proxy/balancers/mod_lbmethod_bytraffic.c
index d1d882bd15..e2b339a8e8 100644
--- a/modules/proxy/balancers/mod_lbmethod_bytraffic.c
+++ b/modules/proxy/balancers/mod_lbmethod_bytraffic.c
@@ -105,10 +105,20 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer,
return mycandidate;
}
+static apr_status_t reset(proxy_balancer *balancer, request_rec *r) {
+ return APR_SUCCESS;
+}
+
+static apr_status_t age(proxy_balancer *balancer, request_rec *r) {
+ return APR_SUCCESS;
+}
+
static const proxy_balancer_method bytraffic =
{
"bytraffic",
&find_best_bytraffic,
+ &reset,
+ &age,
NULL
};
diff --git a/modules/proxy/balancers/mod_lbmethod_heartbeat.c b/modules/proxy/balancers/mod_lbmethod_heartbeat.c
index 571c0e70b4..094e7e53d9 100644
--- a/modules/proxy/balancers/mod_lbmethod_heartbeat.c
+++ b/modules/proxy/balancers/mod_lbmethod_heartbeat.c
@@ -299,10 +299,20 @@ static proxy_worker *find_best_hb(proxy_balancer *balancer,
return mycandidate;
}
+static apr_status_t reset(proxy_balancer *balancer, request_rec *r) {
+ return APR_SUCCESS;
+}
+
+static apr_status_t age(proxy_balancer *balancer, request_rec *r) {
+ return APR_SUCCESS;
+}
+
static const proxy_balancer_method heartbeat =
{
"heartbeat",
&find_best_hb,
+ &reset,
+ &age,
NULL
};
diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h
index 70996983d2..9963594178 100644
--- a/modules/proxy/mod_proxy.h
+++ b/modules/proxy/mod_proxy.h
@@ -390,6 +390,8 @@ struct proxy_balancer_method {
const char *name; /* name of the load balancer method*/
proxy_worker *(*finder)(proxy_balancer *balancer,
request_rec *r);
+ apr_status_t (*reset)(proxy_balancer *balancer, request_rec *r);
+ apr_status_t (*age)(proxy_balancer *balancer, request_rec *r);
void *context; /* general purpose storage */
};
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
index 22deafea77..fd29389cf3 100644
--- a/modules/proxy/proxy_util.c
+++ b/modules/proxy/proxy_util.c
@@ -2346,6 +2346,8 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
worker->hostname);
}
else {
+ if (worker->s->retries) {
+ }
worker->s->error_time = 0;
worker->s->retries = 0;
}