Skip to content

Commit 77b08b3

Browse files
committed
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>
1 parent f20162a commit 77b08b3

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

docs/openfaas-pro/jetstream.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,13 @@ This page is primarily concerned with how to configure the Queue Worker.
1212

1313
You can learn about [asynchronous invocations here](/reference/async).
1414

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-
1915
Popular use-cases include:
2016

2117
- Batch processing and machine learning
2218
- Resilient data pipelines
2319
- Receiving webhooks
2420
- Long running jobs
2521

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-
3322
## Terminology
3423

3524
* [NATS](https://nats.io/) - an open source messaging system hosted by the [CNCF](https://www.cncf.io/)

docs/reference/async.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ Why might you want to use an asynchronous invocation?
1111

1212
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.
1313

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+
1427
### Synchronous vs asynchronous invocation
1528

1629
* Sync
@@ -110,7 +123,7 @@ There are limits for asynchronous functions, which you should understand before
110123
* Concurrency / parallelism - the amount of function invocations processed at any one time.
111124
* Named queues - by default there is one queue, but additional queues can be added. Each named queue can have its own timeout and concurrency.
112125
* 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).
114127

115128
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`.
116129

0 commit comments

Comments
 (0)