Skip to content

Commit bd62664

Browse files
committed
Minor clarification on queue mode
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent b3e319f commit bd62664

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

docs/openfaas-pro/jetstream.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ See [Deploy NATS for OpenFaaS](#deploy-nats-for-openfaas) for instruction on how
6060

6161
The queue-worker uses a shared NATS Stream and NATS Consumer by default, which works well with many of the existing [autoscaling strategies](/reference/async/#autoscaling). Requests are processed in a FIFO order, and it is possible for certain functions to dominate or starve the queue.
6262

63-
A fairer approach is to scale functions based upon their respective queue depth, with a consumer created for each function as and when it is needed.
63+
It's challenging to scale individual functions based upon their queued requests within a shared queue with a single static consumer.
64+
65+
Two alternatives exist for OpenFaaS for Enterprises customers, both of which enable fairer processing of messages across functions, and better autoscaling behaviour:
66+
67+
1. Setup additional named queue-worker deployments with specific functions allocated to them.
68+
2. Configure the built-in queue-worker to partition itself by function, creating consumers on demand, and giving much of the effect of 1. with less operational overhead.
69+
70+
With the approach below, functions can be scaled upon the depth of their queued asynchronous requests, with a consumer created for each function as and when it is needed.
6471

6572
The `mode` parameter can be set to `static` (default) or `function`.
6673

0 commit comments

Comments
 (0)