You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move async use-cases and blog links to the async reference page
Move the use-cases and blog references from the queue-worker page to the
async reference page where they are more relevant. This keeps the
queue-worker page focused on queue-worker configuration rather than
general async use-cases.
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
Copy file name to clipboardExpand all lines: docs/openfaas-pro/jetstream.md
-11Lines changed: 0 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,24 +12,13 @@ This page is primarily concerned with how to configure the Queue Worker.
12
12
13
13
You can learn about [asynchronous invocations here](/reference/async).
14
14
15
-
## Async use cases
16
-
17
-
Every function in OpenFaaS can be invoked either synchronously or asynchronously. Asynchronous invocations are retried automatically, and can return their response to a given endpoint via a webhook.
18
-
19
15
Popular use-cases include:
20
16
21
17
- Batch processing and machine learning
22
18
- Resilient data pipelines
23
19
- Receiving webhooks
24
20
- Long running jobs
25
21
26
-
On the blog we show reference examples built upon these architectural patterns:
27
-
28
-
-[Exploring the Fan out and Fan in pattern with OpenFaaS](https://www.openfaas.com/blog/fan-out-and-back-in-using-functions/)
29
-
-[Generate PDFs at scale on Kubernetes using OpenFaaS and Puppeteer](https://www.openfaas.com/blog/pdf-generation-at-scale-on-kubernetes/)
30
-
-[How to process your data the resilient way with back pressure](https://www.openfaas.com/blog/limits-and-backpressure/)
31
-
-[The Next Generation of Queuing: JetStream for OpenFaaS](https://www.openfaas.com/blog/jetstream-for-openfaas/)
32
-
33
22
## Terminology
34
23
35
24
*[NATS](https://nats.io/) - an open source messaging system hosted by the [CNCF](https://www.cncf.io/)
Copy file name to clipboardExpand all lines: docs/reference/async.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,19 @@ Why might you want to use an asynchronous invocation?
11
11
12
12
You're working with a partner's webhook. They send you data, but if you don't send a HTTP 200 OK within 1 second, they assume failure and retry the message. This works well if your function can complete in less than a second on every invocation, but if there's any risk that it can't, you need another solution. So you will give your partner a URL to the asynchronous function URL instead and it will reply within several milliseconds whilst still processing the data.
13
13
14
+
Other popular use-cases include:
15
+
16
+
- Batch processing and machine learning
17
+
- Resilient data pipelines
18
+
- Long running jobs
19
+
20
+
See these blog posts for examples of asynchronous patterns in practice:
21
+
22
+
-[Exploring the Fan out and Fan in pattern with OpenFaaS](https://www.openfaas.com/blog/fan-out-and-back-in-using-functions/)
23
+
-[Generate PDFs at scale on Kubernetes using OpenFaaS and Puppeteer](https://www.openfaas.com/blog/pdf-generation-at-scale-on-kubernetes/)
24
+
-[How to process your data the resilient way with back pressure](https://www.openfaas.com/blog/limits-and-backpressure/)
25
+
-[The Next Generation of Queuing: JetStream for OpenFaaS](https://www.openfaas.com/blog/jetstream-for-openfaas/)
26
+
14
27
### Synchronous vs asynchronous invocation
15
28
16
29
* Sync
@@ -110,7 +123,7 @@ There are limits for asynchronous functions, which you should understand before
110
123
* Concurrency / parallelism - the amount of function invocations processed at any one time.
111
124
* Named queues - by default there is one queue, but additional queues can be added. Each named queue can have its own timeout and concurrency.
112
125
* Payload size - the maximum size is configured to be 1MB. The limit is defined by NATS, but can be changed. Use a database, or S3 bucket for storing large payloads, and pass an identifier to function calls.
113
-
* Retries - retries are available in [OpenFaaS Pro](https://openfaas.com/support/) with an exponential back-off.
126
+
* Retries - asynchronous invocations can be retried automatically when a function returns an error. Retries use an exponential back-off algorithm. See: [retries](/openfaas-pro/retries).
114
127
115
128
The queue-worker uses a single timeout for how long it will spend processing a message, that is called `ack_wait`. If your longest function can run for *25 minutes*, then the `ack_wait` should be set to at least `25m`.
0 commit comments