You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2006/08/28 18:32:10 UTC
svn commit: r437745 - in /httpd/httpd/branches/2.2.x: CHANGES
modules/proxy/mod_proxy_balancer.c
Author: jim
Date: Mon Aug 28 09:32:09 2006
New Revision: 437745
URL: http://svn.apache.org/viewvc?rev=437745&view=rev
Log:
Merge r417443 from trunk:
* Retry worker chosen by client supplied route / redirect worker if it
is in error state before sending "Service Temporarily Unavailable".
PR: 38962
Submitted by: Christian Boitel <cboitel lfdj.com>
Reviewed by: rpluem
Submitted by: rpluem
Reviewed by: jim
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_balancer.c
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=437745&r1=437744&r2=437745&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Mon Aug 28 09:32:09 2006
@@ -1,7 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.4
-
+ *) mod_proxy_balancer: Retry worker chosen by route / redirect worker if
+ it is in error state before sending "Service Temporarily Unavailable".
+ PR 38962. [Christian Boitel <cboitel lfdj.com>]
Changes with Apache 2.2.3
Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_balancer.c?rev=437745&r1=437744&r2=437745&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_balancer.c Mon Aug 28 09:32:09 2006
@@ -212,18 +212,39 @@
*/
worker = find_route_worker(balancer, *route);
if (worker && !PROXY_WORKER_IS_USABLE(worker)) {
- /* We have a worker that is unusable.
- * It can be in error or disabled, but in case
- * it has a redirection set use that redirection worker.
- * This enables to safely remove the member from the
- * balancer. Of course you will need a some kind of
- * session replication between those two remote.
+ /*
+ * If the worker is in error state run
+ * retry on that worker. It will be marked as
+ * operational if the retry timeout is elapsed.
+ * The worker might still be unusable, but we try
+ * anyway.
*/
- if (*worker->s->redirect)
- worker = find_route_worker(balancer, worker->s->redirect);
- /* Check if the redirect worker is usable */
- if (worker && !PROXY_WORKER_IS_USABLE(worker))
- worker = NULL;
+ ap_proxy_retry_worker("BALANCER", worker, r->server);
+ if (!PROXY_WORKER_IS_USABLE(worker)) {
+ /*
+ * We have a worker that is unusable.
+ * It can be in error or disabled, but in case
+ * it has a redirection set use that redirection worker.
+ * This enables to safely remove the member from the
+ * balancer. Of course you will need some kind of
+ * session replication between those two remote.
+ */
+ if (*worker->s->redirect)
+ worker = find_route_worker(balancer, worker->s->redirect);
+ /* Check if the redirect worker is usable */
+ if (worker && !PROXY_WORKER_IS_USABLE(worker)) {
+ /*
+ * If the worker is in error state run
+ * retry on that worker. It will be marked as
+ * operational if the retry timeout is elapsed.
+ * The worker might still be unusable, but we try
+ * anyway.
+ */
+ ap_proxy_retry_worker("BALANCER", worker, r->server);
+ if (!PROXY_WORKER_IS_USABLE(worker))
+ worker = NULL;
+ }
+ }
}
return worker;
}