Skip to content

Commit b1d6153

Browse files
authored
Recommend Worker Versioning by default (#4349)
1 parent f89f4e5 commit b1d6153

3 files changed

Lines changed: 19 additions & 4 deletions

File tree

docs/best-practices/worker.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,19 @@ Use Worker Versioning to deploy new Workflow code without breaking running Execu
169169
each Workflow Execution to a specific Worker Deployment Version identified by a build ID, which guarantees that pinned
170170
Workflows always run on the same Worker version where they started.
171171

172+
For most teams, Worker Versioning should be the default approach for evolving Workflow code in production. It gives you
173+
safer rollouts, clearer rollback behavior, and a cleaner operational model than maintaining multiple code paths inside a
174+
Workflow definition.
175+
172176
To learn more about versioning Workflows, see the
173177
[Workflow Versioning](/production-deployment/worker-deployments/worker-versioning.mdx) guide or take our
174178
[Worker Versioning course](https://learn.temporal.io/courses/worker_versioning/).
175179

176180
:::tip
177181

178-
In addition to Worker Versioning, you can also use [Patching](/patching) to introduce changes to your Workflow code
179-
without breaking running Executions. Patching reduces complexity on the infrastructure side compared to Worker
180-
Versioning, but it introduces some complexity on the Workflow code side. Choose the approach that best fits your needs.
182+
If your deployment environment cannot yet support Worker Versioning, you can use [Patching](/patching) to introduce
183+
changes to your Workflow code without breaking running Executions. Treat patching as a fallback for environments that
184+
cannot adopt versioned worker deployments yet, not as the default recommendation.
181185

182186
:::
183187

docs/production-deployment/worker-deployments/index.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ Once you have an understanding of the core concepts, the content in this section
2424

2525
Our Worker Deployments guide provides documentation of Temporal product features that make it easier to scale and revise your Workflows.
2626

27-
[Worker Versioning](/production-deployment/worker-deployments/worker-versioning) allows you to pin Workflows to individual versions of your workers, which are called Worker Deployment Versions.
27+
[Worker Versioning](/production-deployment/worker-deployments/worker-versioning) is the recommended default for safely
28+
deploying new Workflow code. It allows you to pin Workflows to individual versions of your workers, which are called
29+
Worker Deployment Versions.
30+
31+
If your environment cannot yet support versioned worker deployments, you can fall back to patching Workflow code.
32+
However, new production deployments should prefer Worker Versioning whenever possible.
2833

2934
You can optionally use the Temporal [Worker Controller](/production-deployment/worker-deployments/kubernetes-controller) to programmatically manage and scale your Worker deployments in Kubernetes pods.
3035

docs/production-deployment/worker-deployments/worker-versioning.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Worker Versioning is a Temporal feature that allows you to confidently deploy ne
2424
your Workers without breaking them. Temporal enables this by helping you manage different builds or versions, formally
2525
called [Worker Deployment Versions](/worker-versioning#deployment-versions).
2626

27+
For most teams, Worker Versioning should be the default recommendation for deploying Workflow code changes in
28+
production. If you can run versioned worker deployments, prefer Worker Versioning over patching.
29+
2730
Worker Versioning unlocks important benefits for users of [blue-green or rainbow deployments](#deployment-systems).
2831

2932
- Ramping traffic gradually to a new Worker Deployment Version.
@@ -133,6 +136,9 @@ rainbow deployments of your Workers if you're using Kubernetes.
133136

134137
:::
135138

139+
If you cannot yet support blue-green or rainbow style deployments, use [patching](/patching) as a fallback while you
140+
work toward a versioned deployment model.
141+
136142
## Configuring a Worker for Versioning
137143

138144
You'll need to add a few additional configuration parameters to your Workers to toggle on Worker Versioning. There are

0 commit comments

Comments
 (0)