temporalio / temporalio/temporal

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

Open
#7,666 4 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by reviewing Temporal's workflow-start options and the existing mechanisms for workflow concurrency, then determine the API and semantics needed for per-type limits. Done means an agreed design for namespace or cluster scope, configuration, and enforcement, with implementation and tests identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.