Configure rate limits
This topic explains how to configure rate limits for the workflow engine’s task workers.
Prerequisites
- Platform 6.3 or newer installed
- System administrator access to modify Platform configuration
- Access to the workflow engine configuration API (for runtime configuration)
Configuration parameters
Rate limiting parameters are set at the Platform instance level in environment variables, your .properties configuration file, or your profile document.
Parameters explained
Task worker rate limit
Primary rate limit control for task execution.
- Set to a positive integer to enable rate limiting.
- Set to
0to disable completely. - Represents the maximum number of tasks that can execute per period.
Task worker rate limit period
Defines the time window (in seconds) for the rate limit.
- Set to a positive integer (seconds).
- Works with
task_worker_rate_limitto define the execution rate. - Example:
task_worker_rate_limit=100withtask_worker_rate_limit_period=1= 100 tasks per second.
In most cases, use the default period of one second unless you need to rate limit to slower than one task per second.
Configuration approach
Rate limiting can be set at startup and adjusted at runtime through the workflow engine API.
At startup: Set in Platform-level environment variables, your .properties configuration file, or your profile document. Configuration loads when the workflow engine starts and persists across restarts.
At runtime: Adjust via the workflow engine HTTP API without a restart. Changes take effect immediately but are not persisted across restarts unless also updated in configuration files.
Configure at startup (persistent)
Determine appropriate rate limits
Choose rate limits based on system resource capacity (CPU, memory), typical workflow volumes and patterns, peak usage times, and downstream service capacity. Monitor your system under typical load and adjust based on observed performance.
Verify configuration
Verify the configuration has been applied using one of these options:
Option 1: Check system logs
Open the workflow engine log files and look for entries confirming rate limit settings — for example, “Task rate limit enabled at X tasks per Y seconds.” Verify the logged values match your configuration.
Option 2: View in Admin Essentials
Navigate to Admin Essentials, select Configuration from the left sidebar, locate the task_worker_* configuration parameters, and verify the values match your configuration.
If values don’t match or no initialization messages appear, check configuration file syntax, verify the configuration is at the Platform level, ensure the Platform version is six or newer, and review system logs for configuration errors.
Configure at runtime (immediate, not persistent)
Use the runtime API to adjust rate limits immediately without restarting services. Changes take effect right away but are not persisted across restarts.
Runtime API changes override configuration file settings until Platform restart. After a restart, configuration loads from files.
Configuration examples
Basic task rate limiting
Enable task rate limiting at 50 tasks per second:
Rate limiting slower than one task per second
Configure rate limiting for very slow task execution:
Result: one task per five seconds (0.2 tasks per second).
Disable rate limiting
Task workers process tasks as quickly as possible without rate limiting.