github.com/hellofresh/janus@v0.0.0-20230925145208-ce8de8183c67/docs/plugins/retry.md (about)

     1  # Retry
     2  
     3  The retry plugin allows you to configure retry rules for your proxy. This enables you to be more resilient for any network or any other kind of failure.
     4  
     5  ## Configuration
     6  
     7  The plain retry config:
     8  
     9  ```json
    10  {
    11      "name" : "retry",
    12      "enabled" : false,
    13      "config" : {
    14          "attempts" : 3,
    15          "backoff": "1s"
    16      }
    17  }
    18  ```
    19  
    20  Configuration | Description
    21  :---|:---|
    22  | attempts      | Number of attempts |
    23  | backoff       | Time that we should wait to retry. This must be given in the [ParseDuration](https://golang.org/pkg/time/#ParseDuration) format. Defaults to `1s` |
    24  | predicate     | The rule that we will check to define if the request was successful or not. You have access to `statusCode` and all the `request` object. Defaults to `statusCode == 0 || statusCode >= 500` |