[EMAIL PROTECTED] wrote:
Author: rjung
Date: Fri Oct  3 12:37:13 2008
New Revision: 701507

URL: http://svn.apache.org/viewvc?rev=701507&view=rev
Log:
Add retry_wait for AJP13 workers.
If a request fails, sleep a configurable time
before each following retry.
Remember: this has nothing to do with the lb retries.

+    retry_wait = p->worker->retry_wait;
     for (i = 0; i < aw->retries; i++) {
         /*
+         * ajp_send_request() already locally handles
+         * reconnecting and broken connection detection.
+         * So if we already failed in it, wait a bit before
+         * retrying the same backend.
+         */
+        if (i > 0 && retry_wait >= 0) {
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "retry %d, sleeping for %d ms before retrying",
+                       i, retry_wait);
+            jk_sleep(retry_wait);
+        }
+        /*

Nice!
Although I'd change retry_wait to retry_interval.

I was thinking to use the retry_wait as absolute timeout
instead 'retries * retry_interval',
with some default step value (as inside lb
with JK_LB_MIN_RETRY_WAIT/JK_LB_MAX_RETRY_WAIT)

This would behave like:
Retry worker 'x' until retry_wait expires.
It would calculate the time spend in accessing
the network as well, and give the real timeout.
Right now we have sleep, but between them network
might introduce variable delays as well.

The same should be applied to load_balancer so that
we can exactly know how much time we'll wait for free
endpoint. So use retry_wait as a limit for retry
steps (they don't need to be configurable there)
Right now for lb we need insane high values for
retries (100 for 10 second wait on free cache entry)

Then retries would be used for their real purpose.

Regards
--
^(TM)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to