This is a calculator for the retriable Ruby gem. Retriable is a simple DSL to retry failed code blocks with randomized exponential backoff time intervals. This is especially useful when interacting external APIs, remote services, or file system calls.
Retriable.retriable(tries: 10, base_interval: 0.5, multiplier: 1.5, rand_factor: 0.5) do
# code here...
end
| Retry # | Min | Average | Max |
|---|---|---|---|
| 1 | 0.250 | 0.500 | 0.750 |
| 2 | 0.375 | 0.750 | 1.125 |
| 3 | 0.563 | 1.125 | 1.688 |
| 4 | 0.844 | 1.688 | 2.531 |
| 5 | 1.266 | 2.531 | 3.797 |
| 6 | 1.898 | 3.797 | 5.695 |
| 7 | 2.848 | 5.695 | 8.543 |
| 8 | 4.271 | 8.543 | 12.814 |
| 9 | 6.407 | 12.814 | 19.222 |
| 10 | stop | stop | stop |