Skip to content

docs: Serverless Workers - Encyclopedia (4/4)#4415

Open
lennessyy wants to merge 3 commits intofeat/serverless-worker-prereleasefrom
feat/serverless-worker-4-encyclopedia
Open

docs: Serverless Workers - Encyclopedia (4/4)#4415
lennessyy wants to merge 3 commits intofeat/serverless-worker-prereleasefrom
feat/serverless-worker-4-encyclopedia

Conversation

@lennessyy
Copy link
Copy Markdown
Contributor

@lennessyy lennessyy commented Apr 8, 2026

Summary

  • Add the encyclopedia page for Serverless Workers (docs/encyclopedia/workers/serverless-workers.mdx) with conceptual overview and architecture diagram
  • Update workers.mdx and task-queues.mdx with references to Serverless Workers
  • Add serverless-worker-flow.svg diagram to static assets
  • Update sidebar to include the new encyclopedia entry under Workers
  • Add "Serverless Worker" to Vale terms list
  • Change onBrokenLinks/onBrokenAnchors from 'throw' to 'warn' to accommodate cross-references to pages in other PRs

Part 4 of 4 in the series splitting #4405 into smaller PRs.

Test plan

  • Verify the encyclopedia page renders correctly
  • Verify the SVG diagram displays properly
  • Verify sidebar shows the new entry under Workers
  • Verify links to other serverless worker pages show as warnings (not errors) until all PRs are merged

🤖 Generated with Claude Code

┆Attachments: EDU-6187 docs: Serverless Workers - Encyclopedia (4/4)

Add the encyclopedia entry for Serverless Workers, update workers.mdx
and task-queues.mdx with serverless references, add the architecture
diagram, update sidebar, and add "Serverless Worker" to Vale terms.

Change onBrokenLinks/onBrokenAnchors to 'warn' to accommodate
cross-references to pages in other PRs in this series.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lennessyy lennessyy requested a review from a team as a code owner April 8, 2026 23:50
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

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

Project Deployment Actions Updated (UTC)
temporal-documentation Ready Ready Preview, Comment Apr 9, 2026 2:45am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

📖 Docs PR preview links

@@ -41,7 +41,7 @@ A Worker Program is the static code that defines the constraints of the Worker P
- [How to run a development Worker using the TypeScript SDK](/develop/typescript/workers/run-worker-process#run-a-dev-worker)
Copy link
Copy Markdown
Contributor Author

@lennessyy lennessyy Apr 8, 2026

Choose a reason for hiding this comment

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

The worker page is going to need a rewrite. With serverless workers, I think we need to update how users should think of this abstraction that we never quite defined well in the docs. Would love some product/engineering input on this question.

  • What is a worker?

We don't answer this question at all right now, and deflect to lower-level abstractions, which isn't very helpful and does not account for serverless workers:

In day-to-day conversations, the term Worker is used to denote either a Worker Program, a Worker Process, or a Worker Entity. Temporal documentation aims to be explicit and differentiate between them.

Maybe something like:

A Worker is the execution environment for your Workflows and Activities. It's where your application code actually runs within Temporal's architecture.

There is no always-on infrastructure to provision or scale.
Temporal invokes the Worker when Tasks arrive on a Task Queue, and the Worker shuts down when the work is done.

A Serverless Worker uses the same Temporal SDKs as a traditional Worker.
Copy link
Copy Markdown
Contributor Author

@lennessyy lennessyy Apr 9, 2026

Choose a reason for hiding this comment

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

I have been using "traditional worker" to refer to long-lived workers when comparing them against serverless. Do we have a preferred name for our normal workers? Standard worker? Long-lived worker? Hosted worker (not great sounds like we host them)? Always-on worker? Or are we happy with traditional

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Long-lived worker is a good name that we also use internally. I am not opposed to a 3-word compound: "traditional Long-lived Worker"

The comparison table lives on the evaluate page now.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There is no always-on infrastructure to provision or scale.
Temporal invokes the Worker when Tasks arrive on a Task Queue, and the Worker shuts down when the work is done.

A Serverless Worker uses the same Temporal SDKs as a traditional Worker.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Long-lived worker is a good name that we also use internally. I am not opposed to a 3-word compound: "traditional Long-lived Worker"


A Serverless Worker uses the same Temporal SDKs as a traditional Worker.
It registers Workflows and Activities the same way.
The difference is in the lifecycle: instead of the Worker starting and polling continuously, Temporal triggers the compute environment, the Worker starts, processes available Tasks, and then exits.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same comment as other PR: "triggers the compute environment" >> "triggers the serverless worker"

3. Temporal uses the compute provider configuration to invoke the serverless function. For example, calling AWS Lambda's `InvokeFunction` API.
4. The serverless function starts, creates a Temporal Client, and begins polling the Task Queue.
5. The Worker processes available Tasks until the compute environment's deadline approaches.
6. The Worker gracefully drains in-progress work and shuts down.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"shuts down": We use "exits" in prior text. I like "shutdown" / "shuts down" because Durable Lambda Function use this terminology so it might be easier for folks to comprehend: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html

Copy link
Copy Markdown

@akhayam akhayam left a comment

Choose a reason for hiding this comment

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

I liked the lifecycle diagram on the Lambda docs page: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html

Should we make something like this for our Serverless Workers?

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