Workflow Concurrency Control

Definition. Limiting how many workflow instances or steps execute simultaneously, to protect downstream systems and to keep resource usage predictable. Unbounded concurrency is a common cause of self-inflicted outages, since a burst of instances overwhelms a dependency.

How it works. Set concurrency limits per dependency, not globally, since each dependency has its own capacity. Use a semaphore or a queue with a worker pool sized to the limit. Monitor saturation per dependency, since a saturated limit is the signal that the workflow is throttled. Raise limits only after confirming the dependency can absorb more.

Example. A workflow processes 2,000 instances concurrently, each calling a payment API that handles 50 requests per second. The API rate-limits, and 40 percent of calls fail. Limiting concurrency to 40 instances keeps the call rate under 50 per second, and failures fall to 0.2 percent. Total throughput is unchanged because the API was the constraint, not the workflow.

Use case. Concurrency control is required for any workflow calling a rate-limited dependency, and it is the mechanism that prevents self-inflicted outages. It is also a cost control for expensive steps.

Warnings. Unbounded concurrency overwhelms dependencies and causes failures that look like dependency problems. Never set a global limit when dependencies have different capacities. And never raise a limit without confirming the dependency can absorb it.

Limitations. Limits reduce throughput when the dependency could handle more, so they require tuning. They also add a queueing layer and a new failure mode when the queue backs up.

← Browse all glossary terms