Skip to content

Conversation

@elithrar
Copy link
Collaborator

@elithrar elithrar commented Dec 2, 2025

Incorporating user feedback on triggering Workflows, limits, the API and general best practices. cc @mmalden @jonesphillip @efalcao for review.

This takes into account the last month of user feedback on Discord.

@elithrar elithrar self-assigned this Dec 2, 2025
@elithrar elithrar added the product:workflows Workflows: https://developers.cloudflare.com/workflows/ label Dec 2, 2025
@elithrar elithrar requested review from a team, celso, jonesphillip and mia303 as code owners December 2, 2025 17:16
@github-actions github-actions bot added the size/m label Dec 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/workflows/ @elithrar, @celso, @mia303, @jonesphillip, @cloudflare/pcx-technical-writing


Instances that are on a `waiting` state - either sleeping, waiting for a retry, or waiting for an event - do **not** count towards concurrency limits. This means that other `queued` instances will be scheduled when an instance goes from a `running` state to a `waiting` one, usually the oldest instance queued, on a best-effort basis. This state transition - `running` to `waiting` - may not occur if the wait duration is too short.
Instances that are in a `waiting` state — either sleeping via `step.sleep`, waiting for a retry, or waiting for an event via `step.waitForEvent` — do **not** count towards concurrency limits. This means you can have millions of Workflow instances sleeping or waiting for events simultaneously, as only actively `running` instances count toward the 10,000 concurrent instance limit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
However, if there are 10,000 concurrent instances actively running, an instance that has been in a `waiting` state will be queued instead of resuming immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workflows Workflows: https://developers.cloudflare.com/workflows/ size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants