Algorithm-Backoff-RetryTimeouts

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


      * Adjustable timeouts - Providing an adjustable timeout after each
      request solves the opposite problem of exponential backoffs: slower,
      unresponsive errors that gobble up all of the max duration time in
      one go. Each new timeout is a certain percentage of the time left.

 Typical scenario

    Here's an example scenario of the algorithm with existing defaults:

        $retry_algo is created, and timer starts
    
        Initial timeout is 25s
    
        1st attempt fails instantly
    
        $retry_algo says to wait 1.4s (±10% jitter), and use a timeout of 24.3s
    
        2nd attempt fails instantly
    
        $retry_algo says to wait 2s (±10% jitter), and use a timeout of 23.3s

lib/Algorithm/Backoff/RetryTimeouts.pm  view on Meta::CPAN

#pod opposite problem of exponential backoffs: slower, unresponsive errors that gobble up all
#pod of the max duration time in one go.  Each new timeout is a certain percentage of the time
#pod left.
#pod
#pod =back
#pod
#pod =head2 Typical scenario
#pod
#pod Here's an example scenario of the algorithm with existing defaults:
#pod
#pod     $retry_algo is created, and timer starts
#pod
#pod     Initial timeout is 25s
#pod
#pod     1st attempt fails instantly
#pod
#pod     $retry_algo says to wait 1.4s (±10% jitter), and use a timeout of 24.3s
#pod
#pod     2nd attempt fails instantly
#pod
#pod     $retry_algo says to wait 2s (±10% jitter), and use a timeout of 23.3s

lib/Algorithm/Backoff/RetryTimeouts.pm  view on Meta::CPAN

opposite problem of exponential backoffs: slower, unresponsive errors that gobble up all
of the max duration time in one go.  Each new timeout is a certain percentage of the time
left.

=back

=head2 Typical scenario

Here's an example scenario of the algorithm with existing defaults:

    $retry_algo is created, and timer starts

    Initial timeout is 25s

    1st attempt fails instantly

    $retry_algo says to wait 1.4s (±10% jitter), and use a timeout of 24.3s

    2nd attempt fails instantly

    $retry_algo says to wait 2s (±10% jitter), and use a timeout of 23.3s



( run in 2.035 seconds using v1.01-cache-2.11-cpan-49f99fa48dc )