temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Сoncurrency limit (built-in semaphore) per Workflow type

Open isaryy opened this issue 7 months ago • 1 comments

Is your feature request related to a problem? Please describe.

It is a recurring orchestration need to limit the number of concurrently running Workflows of a specific type (e.g., never run more than N "MyWorkflow" simultaneously in a namespace or cluster). There is currently no built-in way to set a global concurrency limit by Workflow type in Temporal. Workarounds require custom dispatcher workflows or external distributed semaphores.

Describe the solution you'd like

A built-in semaphore/concurrency limit per Workflow type, configurable via API or workflow start options, so that Temporal itself restricts the number of simultaneously running workflows of a given type.

Describe alternatives you've considered

Building custom dispatcher workflows or using external distributed locks—but these solutions are complex, fragile, and operationally heavy.

Additional context A built-in semaphore would be a general and powerful solution for throttling, batching, and resource protection for a wide range of use cases.

isaryy avatar Apr 27 '25 23:04 isaryy

This is something that we are discussing internally but don't have clear timelines for.

bergundy avatar May 01 '25 23:05 bergundy

Hello @bergundy, are there any updates on concurrency limits for a given worker ?

erdaltoprak avatar Jun 21 '25 15:06 erdaltoprak