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.
The rate/parallelism limits are not applied per
url
, they are applied per Flow-Control-Key
.Keep in mind that rate/period and parallelism info are kept on each publish separately. That means
if you change the rate/period or parallelism on a new publish, the old fired ones will not be affected. They will keep their flowControl config.
During the period that old
publishes
has not delivered but there are also the publishes
with the new rates, QStash will effectively allow
the highest rate/period or highest parallelism. Eventually(after the old publishes are delivered), the new rate/period and parallelism will be used.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: