Skip to content

Commit ae456d8

Browse files
authored
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
1 parent c5faafa commit ae456d8

1 file changed

Lines changed: 27 additions & 4 deletions

File tree

docs/reference/platform/platform-limits.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ Platform limits are enforced across different services in the Tailor Platform to
88

99
## Service Limits
1010

11-
| Service | Limit Type | Limit Value | Description | Impact |
12-
| -------------------- | ---------- | ----------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
13-
| 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 |
11+
| Service | Limit Type | Limit Value | Description | Impact |
12+
| -------------------- | ------------------------------- | ------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
13+
| 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 |
1416

1517
## Recursive Call Detection
1618

@@ -34,9 +36,28 @@ This limit prevents issues in scenarios such as:
3436
- Executor workflows that create cascading service calls
3537
- Event loops where service operations trigger events that cause the same operations to execute again
3638

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+
3758
## Best Practices
3859

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:
4061

4162
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.
4263

@@ -45,3 +66,5 @@ When working with services that have call depth limits, consider the following b
4566
1. **Design for limits**: Anticipate depth limits and handle them gracefully in your application logic.
4667

4768
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

Comments
 (0)