-
Notifications
You must be signed in to change notification settings - Fork 306
docs: Serverless Workers - Evaluate pages (1/4) #4417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lennessyy
merged 3 commits into
feat/serverless-worker-prerelease
from
feat/serverless-worker-1-evaluate
Apr 16, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
docs/evaluate/development-production-features/serverless-workers/demo.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| id: demo | ||
| title: Serverless Workers Interactive Demo | ||
| sidebar_label: Interactive Demo | ||
| slug: /evaluate/serverless-workers/demo | ||
| toc_max_heading_level: 3 | ||
| keywords: | ||
| - serverless | ||
| - lambda | ||
| - aws | ||
| - worker | ||
| - interactive demo | ||
| - serverless worker | ||
| tags: | ||
| - Workers | ||
| - Serverless | ||
| - AWS Lambda | ||
| description: An interactive demo for Temporal Serverless Workers. Explore the configuration, generated code, and execution flow for running Workers on AWS Lambda. | ||
| --- | ||
|
|
||
| Serverless Workers let you run Temporal Workers on serverless compute like AWS Lambda. | ||
| There are no long-lived processes to provision or scale. | ||
| Temporal Cloud invokes your Worker when Tasks arrive, and the Worker shuts down when the work is done. | ||
|
|
||
| Use the interactive demo below to explore how the configuration options affect the generated | ||
| Worker code, deployment script, and CLI commands. Click "Start Workflow" to simulate the | ||
| end-to-end Serverless Worker invocation flow. | ||
|
|
||
|
|
||
|
|
||
| import { ServerlessWorkerDemo } from '@site/src/components'; | ||
|
|
||
| <ServerlessWorkerDemo /> | ||
|
|
||
|
|
||
| --- | ||
|
|
||
| ## Next steps | ||
|
|
||
| - [Serverless Workers - Go SDK](/develop/go/workers/serverless-workers/aws-lambda) for SDK-specific configuration, defaults, and lifecycle details. | ||
| - [Deploy a Serverless Worker](/production-deployment/worker-deployments/serverless-workers) for the full end-to-end deployment guide. |
97 changes: 97 additions & 0 deletions
97
docs/evaluate/development-production-features/serverless-workers/index.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| --- | ||
| id: index | ||
| title: Serverless Workers | ||
| sidebar_label: Serverless Workers | ||
| slug: /evaluate/serverless-workers | ||
| description: Understand the benefits of Serverless Workers and when to use them. Run Temporal Workers on serverless compute with no infrastructure to manage. | ||
| toc_max_heading_level: 4 | ||
| keywords: | ||
| - serverless | ||
| - lambda | ||
| - aws | ||
| - worker | ||
| - serverless worker | ||
| - evaluate | ||
| tags: | ||
| - Workers | ||
| - Serverless | ||
| --- | ||
|
|
||
| Serverless Workers let you run Temporal Workers on serverless compute platforms like AWS Lambda. | ||
| There are no servers to provision, no clusters to scale, and no idle compute to pay for. | ||
| Temporal invokes the Worker when Tasks arrive, and the Worker shuts down when the work is done. | ||
|
|
||
| Serverless Workers use the same Temporal SDKs as traditional long-lived Workers. | ||
| You register Workflows and Activities the same way. | ||
| The difference is in the lifecycle: instead of running a long-lived process, Temporal invokes the Serverless Worker on demand when Tasks arrive. The Worker starts, polls for available Tasks, processes them, and exits when the work is done. | ||
|
|
||
| For a deeper look at how Serverless invocation works under the hood, see [Serverless Workers](/serverless-workers) in the encyclopedia. | ||
|
|
||
| ## Benefits | ||
|
|
||
| ### Reduce operational overhead | ||
|
|
||
| Long-lived Workers require you to provision infrastructure, configure scaling policies, manage deployments, and monitor host-level health. | ||
| Serverless Workers reduce this burden by offloading invocation and scaling to Temporal and the compute provider. | ||
| You still deploy the function and configure the compute provider, but there is no always-on infrastructure to manage and no autoscaling policies to tune. | ||
|
|
||
| Worker management is one of the most common sources of support questions for Temporal users. | ||
| Serverless Workers offer a prescriptive deployment path that reduces the operational surface area and lets you focus on writing Workflows instead of managing infrastructure. | ||
|
|
||
| ### Get started faster | ||
|
|
||
| Running a long-lived Worker requires choosing a hosting strategy, configuring compute resources, and setting up deployment pipelines before you can execute your first Workflow. | ||
|
|
||
| With Serverless Workers, deploying a Worker is as simple as deploying a function. | ||
| Package your Worker code, deploy it to your serverless provider, and configure the connection to Temporal. There is no need to set up Kubernetes, manage container orchestration, or design a scaling strategy. | ||
|
|
||
| ### Scale automatically | ||
|
|
||
| Serverless compute providers handle scaling natively. | ||
| When Task volume increases, the provider spins up additional function instances. | ||
| When traffic drops, instances scale down. When there is no work, there is no compute running. | ||
|
|
||
| This automatic scaling is especially useful for bursty, event-driven workloads where traffic patterns are unpredictable or highly variable. | ||
|
|
||
| ### Pay only for what you use | ||
|
|
||
| Long-lived Workers run continuously, whether or not there is work to process. | ||
| Serverless Workers run only when Tasks are available. | ||
| For workloads with low or intermittent volume, this pay-per-invocation model can significantly reduce compute costs. | ||
|
|
||
| ## When to use Serverless Workers | ||
|
|
||
| Serverless Workers are a good fit when: | ||
|
|
||
| - **Workloads are bursty or event-driven.** Order processing, notifications, webhook handlers, and similar workloads that experience spiky traffic benefit from automatic scaling without over-provisioning. | ||
| - **Traffic is low or intermittent.** If Workers spend most of their time idle, Serverless Workers eliminate the cost of always-on compute. | ||
| - **You want a simpler getting-started path.** Deploying a function is simpler than setting up a container orchestration platform. Serverless Workers reduce the steps between writing Worker code and running your first Workflow. | ||
| - **Your organization has standardized on serverless.** Teams that already run services on Lambda, Cloud Run, or similar platforms can run Temporal Workers using the same deployment patterns and tooling. | ||
| - **You serve multiple tenants with infrequent workloads.** Platforms that run Workflows on behalf of many users or customers can avoid running dedicated Workers per tenant. | ||
|
|
||
| Serverless Workers may not be ideal when: | ||
|
|
||
| - **Activities are long-running and cannot be interrupted.** Some serverless platforms enforce execution time limits. For example, AWS Lambda has a 15-minute execution limit. Activities that run longer than the provider's timeout and cannot be broken into smaller steps need a different hosting strategy or a provider with longer limits (such as Cloud Run). Long-running Workflows are not affected because Workflows can span multiple invocations. | ||
| - **Workloads require sustained high throughput.** For consistently high-volume Task Queues, long-lived Workers on dedicated compute may be more cost-effective and performant. | ||
| - **You need persistent connections.** Some features require a persistent connection between the Worker and Temporal, which serverless invocations do not maintain. | ||
|
|
||
| ## How Serverless Workers compare to long-lived Workers | ||
|
|
||
| | | Long-lived Worker | Serverless Worker | | ||
| |---|---|---| | ||
| | **Lifecycle** | Long-lived process that runs continuously. | Invoked on demand. Starts and stops per invocation. | | ||
| | **Scaling** | You manage scaling (Kubernetes HPA, instance count, etc.). | Temporal invokes additional instances as needed, within the compute provider's concurrency limits. | | ||
| | **Connection** | Persistent connection to Temporal. | Fresh connection on each invocation. | | ||
|
|
||
| ## Supported providers | ||
|
|
||
| | Provider | Status | | ||
| |---|---| | ||
| | AWS Lambda | Available | | ||
|
|
||
| ## Next steps | ||
|
|
||
| - [Interactive demo](/evaluate/serverless-workers/demo) to explore the configuration and invocation flow. | ||
| - [How Serverless Workers work](/serverless-workers) for a deeper look at the invocation lifecycle, compute providers, and architecture. | ||
| - [Deploy a Serverless Worker](/production-deployment/worker-deployments/serverless-workers) for the end-to-end deployment guide. | ||
| - [Serverless Workers - Go SDK](/develop/go/workers/serverless-workers/aws-lambda) for SDK-specific configuration and defaults. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smuneebahmad Is this true? Should we comment on how sticky works here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is here primarily because in Go it looks like
DisableEagerActivitiesis set to always true (users can't override). But yeah if there is a roadmap to remove these limitations we can remove this bulletThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can either remove this bullet point, or say:
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to be specific here if possible. Can we name specific features that require a persistent connection?
I wouldn't want to remove this if the limitation is real and unlikely to change. This page is not meant to be push users to serverless. We want to be helpful here to help them choose serverless vs stick with traditional workers.