8000 Add jitter documentation · symfony/symfony-docs@3914a06 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3914a06

Browse files
committed
Add jitter documentation
1 parent 995ae43 commit 3914a06

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

reference/configuration/framework.rst

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ Configuration
148148
* `max_delay`_
149149
* `max_retries`_
150150
* `multiplier`_
151+
* `jitter`_
151152

152153
* `timeout`_
153154
* `max_duration`_
@@ -164,6 +165,7 @@ Configuration
164165
* `max_delay`_
165166
* `max_retries`_
166167
* `multiplier`_
168+
* `jitter`_
167169

168170
* `http_method_override`_
169171
* `ide`_
@@ -784,7 +786,8 @@ will automaticaly retry failed HTTP requests.
784786
max_retries: 2
785787
delay: 1000
786788
multiplier: 3
787-
max_delay: 500
789+
max_delay: 5000
790+
jitter: 0.3
788791
789792
scoped_clients:
790793
my_api.client:
@@ -835,8 +838,8 @@ backoff_service
835838
The service id used to compute the time to wait between retries. By default, it
836839
uses an instance of
837840
:class:`Symfony\\Component\\HttpClient\\Retry\\ExponentialBackOff` configured
838-
with ``delay``, ``max_delay`` and ``multiplier`` options. This class has to
839-
implement :class:`Symfony\\Component\\HttpClient\\Retry\\RetryBackOffInterface`.
841+
with ``delay``, ``max_delay``, ``multiplier`` and ``jitter`` options. This
842+
class has to implement :class:`Symfony\\Component\\HttpClient\\Retry\\RetryBackOffInterface`.
840843

841844
base_uri
842845
........
@@ -969,6 +972,18 @@ http_version
969972
The HTTP version to use, typically ``'1.1'`` or ``'2.0'``. Leave it to ``null``
970973
to let Symfony select the best version automatically.
971974

975+
jitter
976+
......
977+
978+
**type**: ``float`` **default**: ``0.1``
979+
980+
.. versionadded:: 5.2
981+
982+
The ``jitter`` option was introduced in Symfony 5.2.
983+
984+
The probability (expressed with a float between ``0.0`` and ``1.0``) of
985+
randomness to apply to the delay to wait between retries.
986+
972987
local_cert
973988
..........
974989

0 commit comments

Comments
 (0)
0