FlowControl enables you to limit the number of messages sent to your endpoint via delaying the delivery. There are two limits that you can set with the FlowControl feature: Rate and Parallelism. And if needed both parameters can be combined. For theDocumentation Index
Fetch the complete documentation index at: https://upstash-partnerstash.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
FlowControl, you need to choose a key first. This key is used to count the number of calls made to your endpoint.
There are not limits to number of keys you can use.
Rate and Period Parameters
Therate parameter specifies the maximum number of calls allowed within a given period. The period parameter allows you to specify the time window over which the rate limit is enforced. By default, the period is set to 1 second, but you can adjust it to control how frequently calls are allowed. For example, you can set a rate of 10 calls per minute as follows:
Parallelism Limit
The parallelism limit is the number of calls that can be active at the same time. Active means that the call is made to your endpoint and the response is not received yet. You can set the parallelism limit to 10 calls active at the same time as follows:Rate, Parallelism, and Period Together
All three parameters can be combined. For example, with a rate of 10 per minute, parallelism of 20, and a period of 1 minute, QStash will trigger 10 calls in the first minute and another 10 in the next. Since none of them will have finished, the system will wait until one completes before triggering another.Monitor
You can monitor wait list size of your flow control key’s from the consoleFlowControl tab.
