Optimize workflow engine performance by configuring rate limits that control how quickly the Workflow Engine initiates task execution. Rate limiting prevents system overload, optimizes resource utilization, and maintains stable performance during high-volume workflow processing.
Understanding the Workflow Engine
The Workflow Engine is the runtime execution layer that runs the automation logic defined in your workflows. When you design a workflow with tasks, transformations, and logic in Studio, the Workflow Engine actually:
- Executes each task in the proper sequence
- Handles the data flow between tasks
- Processes conditional logic and decision points
- Manages integrations with external systems
- Handles error conditions and retry logic
- Tracks job execution status
What is rate limiting?
Rate limiting is a configurable mechanism built into the Workflow Engine's task worker. It controls how quickly tasks are sent for execution, preventing the Workflow Engine from overwhelming itself and downstream services.
When rate limiting is enabled, the combined task execution rate for all task workers in a Platform instance is guaranteed to be at or lower than the configured rate limit. This ensures predictable, sustainable processing that matches your system's capabilities.
Why it matters
System stability
Without rate limiting, the Workflow Engine processes tasks and jobs as quickly as possible, which can lead to resource exhaustion. Rate limiting prevents this by controlling initiation speed to match available system resources.
Predictable performance
With appropriate configuration, rate limiting provides consistent, predictable performance characteristics. Your system maintains steady throughput rather than experiencing alternating periods of extremely fast processing followed by slowdowns or failures.
Scalability
Properly configured rate limiting enables smaller Platform instances to remain stable under load. You can deploy Platform on less expensive hardware while maintaining reliable workflow execution, and scale horizontally by adding more Platform nodes.
Downstream service protection
Rate limiting helps control load on the Workflow Engine. While this can help reduce pressure on downstream services, it's not a complete solution for managing downstream capacity. Additional mechanisms may be needed to fully control load on downstream systems.
How it works
Rate limiting is applied at the Workflow Engine level, controlling task worker execution rates.
Key characteristics
Tasks are never dropped
Tasks wait in the queue until the task worker picks them up for processing. Rate limiting controls how quickly the task worker processes tasks from the queue, but no tasks are ever discarded.
Execution order is preserved
Tasks execute in the order they were queued. Rate limiting delays execution but does not change the sequence.
Platform-level rate limiting
Rate limits are set at the Platform instance level. If you configure multiple task workers within a single Platform instance, their combined task execution rate will not exceed the configured rate limit.
Multi-instance scaling
Each Platform instance applies rate limiting independently. Total system throughput scales linearly as you add Platform nodes.
Rate limiting vs. concurrency control
Rate limiting controls the speed at which tasks are initiated—how many can start per unit of time. This is what Optimize workflow engine performance implements.
Concurrency control limits the number of tasks that can run simultaneously—a cap on parallel execution.
For the Workflow Engine, rate limiting is more effective because most long-running tasks consume few system resources while waiting for responses. The system load comes primarily from the task initiation process itself—the bookkeeping, state computation, and method dispatch.
Configuration overview
You can configure rate limiting for task workers with these parameters:
- Task rate limit: Maximum number of tasks to run per time period
- Rate limit period: Time period in seconds for the rate limit
- Task worker threads: Number of worker threads for task processing (all threads share the rate limit)
Multiple task workers
You can configure multiple task worker threads within a single Platform instance to improve CPU utilization and concurrent processing. All task workers in an instance share the configured rate limit.
Example: 3 task workers with 150 tasks/second limit = 150 tasks/second total (~50 per worker)
For more information, see Configure rate limiting.
Update rate limits dynamically
You can activate and deactivate the task worker from the Admin Essentials dashboard or through the WorkFlowEngine API. To update rate limit settings while your Platform instance is running, you must first deactivate the task worker, update the rate limit configuration, and then reactivate the task worker. This ensures the new settings are applied correctly without conflicts.
Always deactivate the task worker before modifying rate limit settings to avoid potential race conditions.