App-AlgorithmBackoffUtils
view release on metacpan or search on metacpan
avoid so-called "thundering herd" problem.
The jitter will be applied to delay on failure as well as on
success.
* logs* => *array[str]*
List of failures or successes.
A list of 0's (to signify failure) or 1's (to signify success). Each
failure/success can be followed by ":TIMESTAMP" (unix epoch) or
":+SECS" (number of seconds after the previous log), or the current
timestamp will be assumed. Examples:
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
(10 failures followed by 5 successes).
0 0:+2 0:+4 0:+6 1
(4 failures, 2 seconds apart, followed by immediate success.)
lib/App/AlgorithmBackoffUtils.pm view on Meta::CPAN
summary => 'List of failures or successes',
schema => ['array*', of=>'str*', 'x.perl.coerce_rules'=>['From_str::comma_sep']],
'x.name.is_plural' => 1,
'x.name.singular' => 'log',
req => 1,
pos => 0,
slurpy => 1,
description => <<'_',
A list of 0's (to signify failure) or 1's (to signify success). Each
failure/success can be followed by `:TIMESTAMP` (unix epoch) or `:+SECS` (number
of seconds after the previous log), or the current timestamp will be assumed.
Examples:
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
(10 failures followed by 5 successes).
0 0:+2 0:+4 0:+6 1
(4 failures, 2 seconds apart, followed by immediate success.)
lib/App/AlgorithmBackoffUtils.pm view on Meta::CPAN
(1+jitter_factor). Jitters are usually added to avoid so-called "thundering
herd" problem.
The jitter will be applied to delay on failure as well as on success.
=item * B<logs>* => I<array[str]>
List of failures or successes.
A list of 0's (to signify failure) or 1's (to signify success). Each
failure/success can be followed by C<:TIMESTAMP> (unix epoch) or C<:+SECS> (number
of seconds after the previous log), or the current timestamp will be assumed.
Examples:
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
(10 failures followed by 5 successes).
0 0:+2 0:+4 0:+6 1
(4 failures, 2 seconds apart, followed by immediate success.)
script/show-backoff-delays view on Meta::CPAN
Valid values:
["Constant","Exponential","Fibonacci","LILD","LIMD","MILD","MIMD"]
=item B<--log>=I<s@>*
List of failures or successes.
A list of 0's (to signify failure) or 1's (to signify success). Each
failure/success can be followed by `:TIMESTAMP` (unix epoch) or `:+SECS` (number
of seconds after the previous log), or the current timestamp will be assumed.
Examples:
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
(10 failures followed by 5 successes).
0 0:+2 0:+4 0:+6 1
(4 failures, 2 seconds apart, followed by immediate success.)
( run in 0.631 second using v1.01-cache-2.11-cpan-39bf76dae61 )