Oh also, is there a way to limit
Oh also, is there a way to limit concurrency of a specific workflow?
Let's say, downstream api is 100 req/min, I'd want to prioritize the oldest workflows and also limit concurrency. How would this look like with workflows?
6 Replies
So, prioritization of the oldest workflows are done by default.
Regarding limiting concurrency at your own pace, we do not provide a clean way to do it...
But remember, you can create a Workflow to manage other Workflows. So, for every new Workflow you create, you save their id and start_timestamp in a KV, and on the Manager Workflows, on a while loop, pause and resume Workflows according to your limits or intentions.
Some food for though.
How would you ensure that there is always one and only one "Manager" workflow running at all times?
Create no external triggers, such as from fetch, and trigger it manually. Once started, it will run forever
Wait really? Workflows don't have subrequest limits?
Oh, so if you use a service binding, it doesn't go over the internet and therefor doesn't get counted as a "subrequest". Therefor, you can stop & restart workflows forever
Is this true? Is there no subrequest limit in Workflows??
There isn't subrequest limits for service bindings (as a whole), since a service binding doesn't count as a subrequest