[Melbourne-pm] Retry/Attempt

wigs at stirfried.org wigs at stirfried.org
Mon May 17 18:06:54 PDT 2010


On Mon, May 17, 2010 at 10:58:02AM -0400, Patrick Donelan wrote:
> Toby wrote:
> > Notably, his module is designed more to retry over and over quickly,
> > whereas mine increases the delay between retries
> 
> I'm jealous, a genuine opportunity to use Fibonacci in a real-world program!

Nah, simple doubling, not Fibonacci:

   sleep($delay);
   $delay *= 2;

For a good discussion on the approach I recommend this article,
http://dthain.blogspot.com/2009/02/exponential-backoff-in-distributed.html
which goes into the theory of how to choose a good delay value based on the
behaviours of your system.

-- 
Wigs


More information about the Melbourne-pm mailing list