Skip to content

Split the shared Task Queue guidance by compute provider - #5177

Open
lennessyy wants to merge 4 commits into
mainfrom
serverless-scaling-long-lived-cloud-run
Open

Split the shared Task Queue guidance by compute provider#5177
lennessyy wants to merge 4 commits into
mainfrom
serverless-scaling-long-lived-cloud-run

Conversation

@lennessyy

@lennessyy lennessyy commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

What

The Serverless Workers "Scaling with long-lived Workers" section described AWS Lambda behavior only. The two compute providers size their Workers from different signals, so the guidance is now a subsection on each provider page.

Lambda invokes a Worker on sync match failure or backlog, so a long-lived fleet that keeps up produces neither and the Serverless Workers act as spillover capacity.

Cloud Run sizes the pool from the arrival rate on the Worker Deployment Version's Task Queues, which counts Tasks the long-lived Workers are already processing. The pool scales up to duplicate their capacity, so the guidance is to give the Serverless Workers their own Task Queue.

The Cloud Run behavior is read from rate_based.go on temporal-auto-scaled-workers main, not verified by testing. Worth a check from someone on the WCI side before merge.

The section described Lambda behavior only, and said Serverless Workers
are invoked on sync match failure alone, which the note earlier on the
page already contradicts.

Split the section by execution model. A Cloud Run pool instance polls
continuously, so a running pool takes a share of the Task Queue rather
than only the overflow, and acts as spillover only at zero instances.
Copilot AI balanced review requested due to automatic review settings August 24, 2026 21:02
@lennessyy
lennessyy requested a review from a team as a code owner August 24, 2026 21:02
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
temporal-documentation Ready Ready Preview Aug 24, 2026 9:56pm

Request Review

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

📖 Docs PR preview links

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates Serverless Worker scaling documentation to distinguish AWS Lambda and GCP Cloud Run behavior.

Changes:

  • Explains provider-specific Task Queue sharing.
  • Clarifies risks when both Worker groups scale dynamically.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Each provider's Autoscaling section now carries a subsection on sharing
a Task Queue with long-lived Workers, matching how the index page
already delegates autoscaling, lifecycle, and versioning by provider.

The index section keeps the shared framing, the caution that applies to
both providers, and links to the two subsections.
The two providers size their Workers from different signals, so the
guidance differs. Lambda invokes on sync match failure or backlog, so a
long-lived fleet that keeps up produces neither and the Serverless
Workers act as spillover.

Cloud Run sizes the pool from the arrival rate on the Worker Deployment
Version's Task Queues, which counts Tasks the long-lived Workers are
already processing. The pool scales up to duplicate their capacity, so
the guidance is to give the Serverless Workers their own Task Queue.

The index section becomes a pointer to both, since the two cautions no
longer share content.
@lennessyy lennessyy changed the title Cover Cloud Run in the long-lived Worker scaling section Split the shared Task Queue guidance by compute provider Aug 24, 2026
The recommendation not to share a Task Queue was in a caution at the end
of the subsection. Put it first, followed by the consequence and then the
mechanism, and drop the now-redundant admonition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants