You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add workflow concurrency limits to platform limits page (#104)
* docs: add workflow concurrency limits to platform limits page
* docs: broaden best practices intro to cover all platform limits
* docs: use consistent inline code formatting for status values
| Recursive Call Limit | Call Depth | 10 levels | Max depth for nested platform-to-platform requests (pipelines, functions, etc.) | Request rejected with BadRequest error if depth exceeds 10 levels |
14
+
| Workflow | Workspace Concurrent Executions | 50 executions | Max concurrent workflow executions per workspace | Pending executions remain in `PENDING` status until running executions drop below the cap |
15
+
| Workflow | Per-Workflow Concurrent Executions | 20 executions | Max concurrent executions of a single workflow | Pending executions remain in `PENDING` status until running executions drop below the cap |
14
16
15
17
## Recursive Call Detection
16
18
@@ -34,9 +36,28 @@ This limit prevents issues in scenarios such as:
34
36
- Executor workflows that create cascading service calls
35
37
- Event loops where service operations trigger events that cause the same operations to execute again
36
38
39
+
## Workflow Concurrency Limits
40
+
41
+
The Tailor Platform enforces concurrency limits on workflow executions at the scheduler level to prevent resource exhaustion and ensure fair scheduling across workspaces.
42
+
43
+
### How It Works
44
+
45
+
Two independent limits control the number of concurrent workflow executions:
46
+
47
+
-**Workspace-wide limit (50)**: Caps the total number of concurrently running workflow executions within a single workspace. This prevents any one workspace from monopolizing platform resources.
48
+
-**Per-workflow limit (20)**: Caps the number of concurrently running executions of the same workflow definition. This prevents a single high-volume workflow from starving other workflows in the workspace.
49
+
50
+
When either limit is reached, new executions are not rejected. Instead, they remain in `PENDING` status and are re-evaluated on the next scheduler polling tick. Once running executions complete and slots become available, pending executions are transitioned to `RUNNING` automatically.
51
+
52
+
### Behavior
53
+
54
+
- Both limits are enforced independently. An execution must satisfy both limits to start running.
55
+
- If the workspace-wide limit is reached, no new executions start in that workspace regardless of per-workflow counts.
56
+
- If the per-workflow limit is reached for a specific workflow, other workflows in the same workspace can still start new executions (as long as the workspace-wide limit is not reached).
57
+
37
58
## Best Practices
38
59
39
-
When working with services that have call depth limits, consider the following best practices:
60
+
When working within platform limits, consider the following best practices:
40
61
41
62
1.**Avoid deep service nesting**: Design workflows to minimize the depth of service-to-service calls. Consider flattening complex nested operations or using alternative patterns like event-driven architectures with proper safeguards.
42
63
@@ -45,3 +66,5 @@ When working with services that have call depth limits, consider the following b
45
66
1.**Design for limits**: Anticipate depth limits and handle them gracefully in your application logic.
46
67
47
68
1.**Use alternative patterns**: Consider using event-driven architectures, queuing systems, or batch processing for complex workflows that might exceed depth limits.
69
+
70
+
1.**Design for workflow concurrency**: If your application triggers many workflow executions simultaneously, be aware that excess executions will queue as `PENDING`. Design your application to handle this gracefully rather than assuming immediate execution.
0 commit comments