Skip to content

Commit

Permalink
Support setting the backoff algorithm for retries
Browse files Browse the repository at this point in the history
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
welteki authored and alexellis committed Sep 4, 2023
1 parent d60bb0e commit 2c2b483
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions chart/openfaas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ yaml) |
| `queueWorker.replicas` | Replicas of the queue-worker, pick more than `1` for HA | `1` |
| `queueWorker.resources` | Resource limits and requests for the queue-worker pods | See [values.yaml](./values.yaml) |
| `queueWorker.queueGroup` | The name of the queue group used to process asynchronous function invocations | `faas` |
| `queueWorkerPro.backoff` | The backoff algorithm used for retries. Must be one off `exponential`, `full` or `equal`| `exponential` |
| `queueWorkerPro.httpRetryCodes` | Comma-separated list of HTTP status codes the queue-worker should retry | `408,429,500,502,503,504` |
| `queueWorkerPro.image` | Container image used for the Pro version of the queue-worker | See [values.yaml](./values.yaml) |
| `queueWorkerPro.initialRetryWait` | Time to wait for the first retry | `10s` |
Expand Down
2 changes: 2 additions & 0 deletions chart/openfaas/templates/jetstream-queueworker-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ spec:
value: "{{ .Values.jetstreamQueueWorker.logs.format }}"
- name: upstream_timeout
value: "{{ .Values.gateway.upstreamTimeout }}"
- name: backoff
value: "{{ .Values.queueWorkerPro.backoff }}"

# OpenFaaS PRO license required
- name: "max_retry_attempts"
Expand Down
1 change: 1 addition & 0 deletions chart/queue-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ helm upgrade slow-queue chart/queue-worker \
| `maxRetryWait` | The maximum amount of time to wait between retries | `120s` |
| `initialRetryWait` | The amount of time to wait for the first retry | `10s` |
| `httpRetryCodes` | A comma-separated list of HTTP status codes which the queue worker will retry when received from a function | `408,429,500,502,503,504` |
| `backoff` | The backoff algorithm used for retries. Must be one off `exponential`, `full` or `equal`| `exponential` |
| `gateway.host` | The host at which the OpenFaaS gateway can be reached | `http://gateway.openfaas` |
| `insecureTLS` | Enable insecure tls for callbacks | `false` |
| `gateway.port` | The port at which the OpenFaaS gateway can be reached | `8080` |
Expand Down
2 changes: 2 additions & 0 deletions chart/queue-worker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ spec:
value: "{{ .Values.initialRetryWait }}"
- name: "retry_http_codes"
value: "{{ .Values.httpRetryCodes }}"
- name: "backoff"
value: "{{ .Values.backoff }}"

- name: "debug"
value: "{{ .Values.logs.debug }}"
Expand Down

0 comments on commit 2c2b483

Please sign in to comment.