You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-orchestration-versioning.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Orchestration Versioning in Durable Functions - Azure
3
-
description: Learn how to use the Orchestration Versioning feature in Durable Functions for zero-downtime deployments involving breaking changes.
2
+
title: Orchestration versioning in Durable Functions - Azure
3
+
description: Learn how to use the orchestration versioning feature in Durable Functions for zero-downtime deployments involving breaking changes.
4
4
author: AnatoliB
5
5
ms.topic: conceptual
6
6
ms.date: 07/03/2025
@@ -9,11 +9,11 @@ ms.custom: fasttrack-edit
9
9
#Customer intent: As a Durable Functions developer, I want to deploy breaking changes to my orchestrations without interrupting in-flight instances, so that I can maintain zero-downtime deployments.
10
10
---
11
11
12
-
# Orchestration Versioning in Durable Functions (Azure Functions)
12
+
# Orchestration versioning in Durable Functions (Azure Functions)
13
13
14
14
## Overview
15
15
16
-
Orchestration Versioning addresses [the core challenge](durable-functions-versioning.md) of deploying changes to orchestrator functions while maintaining the deterministic execution model that Durable Functions requires. Without this feature, breaking changes to orchestrator logic or activity function signatures would cause in-flight orchestration instances to fail during replay because they would break the [determinism requirement](durable-functions-code-constraints.md) that ensures reliable orchestration execution.
16
+
Orchestration versioning addresses [the core challenge](durable-functions-versioning.md) of deploying changes to orchestrator functions while maintaining the deterministic execution model that Durable Functions requires. Without this feature, breaking changes to orchestrator logic or activity function signatures would cause in-flight orchestration instances to fail during replay because they would break the [determinism requirement](durable-functions-code-constraints.md) that ensures reliable orchestration execution.
17
17
18
18
Sub-orchestrations can also leverage this feature.
19
19
@@ -35,7 +35,7 @@ Understanding this distinction is crucial for orchestration versioning, where th
35
35
36
36
### How it works
37
37
38
-
The Orchestration Versioning feature operates on these core principles:
38
+
The orchestration versioning feature operates on these core principles:
39
39
40
40
1.**Version Association**: When an orchestration instance is created, it gets a version permanently associated with it.
41
41
@@ -46,12 +46,12 @@ The Orchestration Versioning feature operates on these core principles:
46
46
3.**Forward Protection**: The runtime automatically prevents workers running older orchestrator versions from executing orchestrations started by newer orchestrator versions.
47
47
48
48
> [!IMPORTANT]
49
-
> Orchestration Versioning is currently in public preview for apps running in the .NET isolated model. Use `Microsoft.Azure.Functions.Worker.Extensions.DurableTask` package version **>=1.5.0**.
49
+
> Orchestration versioning is currently in public preview for apps running in the .NET isolated model. Use `Microsoft.Azure.Functions.Worker.Extensions.DurableTask` package version **>=1.5.0**.
50
50
> Support for other languages (JavaScript, Python, PowerShell, Java) is coming soon.
51
51
52
52
## Basic usage
53
53
54
-
The most common use case for Orchestration Versioning is when you need to make breaking changes to your orchestrator logic while keeping existing in-flight orchestration instances running with their original version. All you need to do is update the `defaultVersion` in your `host.json` and modify your orchestrator code to check the orchestration version and branch execution accordingly. Let's walk through the required steps.
54
+
The most common use case for orchestration versioning is when you need to make breaking changes to your orchestrator logic while keeping existing in-flight orchestration instances running with their original version. All you need to do is update the `defaultVersion` in your `host.json` and modify your orchestrator code to check the orchestration version and branch execution accordingly. Let's walk through the required steps.
55
55
56
56
> [!NOTE]
57
57
> The behavior described in this section targets the most common situations, and this is what the default configuration provides. However, it can be modified if needed (see [Advanced usage](#advanced-usage) for details).
@@ -121,7 +121,7 @@ public static async Task<string> RunOrchestrator(
121
121
> The `context.Version` property is **read-only** and reflects the version that was permanently associated with the orchestration instance when it was created. You cannot modify this value during orchestration execution. If you want to specify a version through means other than `host.json`, you can do so when starting an orchestration instance with the orchestration client APIs (see [Starting New Orchestrations with Specific Versions](#starting-new-orchestrations-with-specific-versions)).
122
122
123
123
> [!TIP]
124
-
> If you're just starting to use Orchestration Versioning and you already have in-flight orchestrations that were created before you specified a `defaultVersion`, you can still add the `defaultVersion` setting to your `host.json` now. For all previously created orchestrations, `context.Version` returns `null` (or an equivalent language-dependent value), so you can structure your orchestrator logic to handle both the legacy (null version) and new versioned orchestrations accordingly. In C#, you can check for `context.Version == null` or `context.Version is null` to handle the legacy case. Please also note that specifying `"defaultVersion": null` in `host.json` is equivalent to not specifying it at all.
124
+
> If you're just starting to use orchestration versioning and you already have in-flight orchestrations that were created before you specified a `defaultVersion`, you can still add the `defaultVersion` setting to your `host.json` now. For all previously created orchestrations, `context.Version` returns `null` (or an equivalent language-dependent value), so you can structure your orchestrator logic to handle both the legacy (null version) and new versioned orchestrations accordingly. In C#, you can check for `context.Version == null` or `context.Version is null` to handle the legacy case. Please also note that specifying `"defaultVersion": null` in `host.json` is equivalent to not specifying it at all.
125
125
126
126
> [!TIP]
127
127
> Depending on your situation, you may prefer branching on different levels. You can make a local change precisely where this change is required, like the example shows. Alternatively, you can branch at a higher level, even at the entire orchestrator implementation level, which introduces some code duplication, but may keep the execution flow clear. It's up to you to choose the approach that best fits your scenario and coding style.
@@ -143,7 +143,7 @@ Here's what to expect once you deploy your updated orchestrator function with th
143
143
144
144
### Example: Replacing an activity in the sequence
145
145
146
-
This example shows how to replace one activity with a different activity in the middle of a sequence using Orchestration Versioning.
146
+
This example shows how to replace one activity with a different activity in the middle of a sequence using orchestration versioning.
147
147
148
148
#### Version 1.0
149
149
@@ -365,7 +365,7 @@ Over time, you may want to remove legacy code paths from your orchestrator funct
365
365
-**Solution**: This is expected behavior. The runtime intentionally prevents older workers from executing orchestrations with newer versions to maintain safety. Ensure all workers are updated to the latest orchestrator version and their `defaultVersion` setting in `host.json` is updated accordingly. You can modify this behavior if needed using the advanced configuration options (see [Advanced usage](#advanced-usage) for details).
366
366
367
367
-**Issue**: Version information isn't available in orchestrator (`context.Version` is null, regardless of the `defaultVersion` setting)
368
-
-**Solution**: Verify that you're using a supported language and a Durable Functions extension version that supports Orchestration Versioning:
368
+
-**Solution**: Verify that you're using a supported language and a Durable Functions extension version that supports orchestration versioning:
369
369
- For .NET Isolated, use `Microsoft.Azure.Functions.Worker.Extensions.DurableTask` version **1.5.0** or later.
370
370
371
371
-**Issue**: Orchestrations of a newer version are making very slow progress or are completely stuck
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-versioning.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,7 +186,7 @@ This change adds a new function call to *SendNotification* between *Foo* and *Ba
186
186
Here are some of the strategies for dealing with versioning challenges:
187
187
188
188
* Do nothing (not recommended)
189
-
* Orchestration Versioning (recommended in most cases)
189
+
* Orchestration versioning (recommended in most cases)
190
190
* Stop all in-flight instances
191
191
* Side-by-side deployments
192
192
@@ -204,19 +204,19 @@ Because of these potential failures, the "do nothing" strategy is not recommende
204
204
### Orchestration versioning
205
205
206
206
> [!NOTE]
207
-
> Orchestration Versioning is currently in public preview.
207
+
> Orchestration versioning is currently in public preview.
208
208
209
-
The Orchestration Versioning feature allows different versions of orchestrations to coexist and execute concurrently without conflicts and non-determinism issues, making it possible to deploy updates while allowing in-flight orchestration instances to complete without manual intervention.
209
+
The orchestration versioning feature allows different versions of orchestrations to coexist and execute concurrently without conflicts and non-determinism issues, making it possible to deploy updates while allowing in-flight orchestration instances to complete without manual intervention.
210
210
211
-
With Orchestration Versioning:
211
+
With orchestration versioning:
212
212
- Each orchestration instance gets a version permanently associated with it when created
213
213
- Orchestrator functions can examine their version and branch execution accordingly
214
214
- Workers running newer orchestrator function versions can continue executing orchestration instances created by older versions
215
215
- The runtime prevents workers running older orchestrator function versions from executing orchestrations of newer versions
216
216
217
217
This strategy is recommended for applications that need to support breaking changes while maintaining [zero-downtime deployments](durable-functions-zero-downtime-deployment.md). The feature is currently available .NET isolated apps.
218
218
219
-
For detailed configuration and implementation guidance, see [Orchestration Versioning in Durable Functions](durable-functions-orchestration-versioning.md).
219
+
For detailed configuration and implementation guidance, see [Orchestration versioning in Durable Functions](durable-functions-orchestration-versioning.md).
220
220
221
221
### Stop all in-flight instances
222
222
@@ -248,7 +248,7 @@ When doing side-by-side deployments in Azure Functions or Azure App Service, we
248
248
## Next steps
249
249
250
250
> [!div class="nextstepaction"]
251
-
> [Learn about Orchestration Versioning](durable-functions-orchestration-versioning.md)
251
+
> [Learn about orchestration versioning](durable-functions-orchestration-versioning.md)
252
252
253
253
> [!div class="nextstepaction"]
254
254
> [Learn about using and choosing storage providers](durable-functions-storage-providers.md)
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-zero-downtime-deployment.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,15 +15,15 @@ The [reliable execution model](./durable-functions-orchestrations.md) of Durable
15
15
16
16
To prevent these failures from happening, you have several options:
17
17
- Delay your deployment until all running orchestration instances have completed.
18
-
- Use [Orchestration Versioning](durable-functions-orchestration-versioning.md) to allow different versions of orchestrations to coexist (recommended).
18
+
- Use [orchestration versioning](durable-functions-orchestration-versioning.md) to allow different versions of orchestrations to coexist (recommended).
19
19
- Make sure that any running orchestration instances use the existing versions of your functions.
20
20
21
21
The following chart compares the four main strategies to achieve a zero-downtime deployment for Durable Functions:
22
22
23
23
| Strategy | When to use | Pros | Cons |
24
24
| -------- | ------------ | ---- | ---- |
25
-
|[Orchestration Versioning](#orchestration-versioning)| Applications with [breaking changes](durable-functions-versioning.md), especially those that need to support concurrent execution of different orchestration versions. | Enables zero-downtime deployments with breaking changes.<br/>Built-in feature requiring minimal configuration. | Currently limited to .NET isolated.<br/>Requires careful orchestrator code modifications for version compatibility. |
26
-
|[Name-based Versioning](#name-based-versioning)| Applications that don't experience frequent [breaking changes.](durable-functions-versioning.md)| Simple to implement. | Increased function app size in memory and number of functions.<br/>Code duplication. |
25
+
|[Orchestration versioning](#orchestration-versioning)| Applications with [breaking changes](durable-functions-versioning.md), especially those that need to support concurrent execution of different orchestration versions. | Enables zero-downtime deployments with breaking changes.<br/>Built-in feature requiring minimal configuration. | Currently limited to .NET isolated.<br/>Requires careful orchestrator code modifications for version compatibility. |
26
+
|[Name-based versioning](#name-based-versioning)| Applications that don't experience frequent [breaking changes.](durable-functions-versioning.md)| Simple to implement. | Increased function app size in memory and number of functions.<br/>Code duplication. |
27
27
|[Status check with slot](#status-check-with-slot)| A system that doesn't have long-running orchestrations lasting more than 24 hours or frequently overlapping orchestrations. | Simple code base.<br/>Doesn't require additional function app management. | Requires additional storage account or task hub management.<br/>Requires periods of time when no orchestrations are running. |
28
28
|[Application routing](#application-routing)| A system that doesn't have periods of time when orchestrations aren't running, such as those time periods with orchestrations that last more than 24 hours or with frequently overlapping orchestrations. | Handles new versions of systems with continually running orchestrations that have breaking changes. | Requires an intelligent application router.<br/>Could max out the number of function apps allowed by your subscription. The default is 100. |
29
29
@@ -32,21 +32,21 @@ The remainder of this document describes these strategies in more detail.
32
32
> [!NOTE]
33
33
> The descriptions for these zero-downtime deployment strategies assume you are using the default Azure Storage provider for Durable Functions. The guidance may not be appropriate if you are using a storage provider other than the default Azure Storage provider. For more information on the various storage provider options and how they compare, see the [Durable Functions storage providers](durable-functions-storage-providers.md) documentation.
34
34
35
-
## Orchestration Versioning
35
+
## Orchestration versioning
36
36
37
-
The [Orchestration Versioning](durable-functions-orchestration-versioning.md) feature allows you to make breaking changes to orchestrations while avoiding downtime during deployments. This built-in feature enables different versions of orchestrations to coexist and execute concurrently without conflicts.
37
+
The [orchestration versioning](durable-functions-orchestration-versioning.md) feature allows you to make breaking changes to orchestrations while avoiding downtime during deployments. This built-in feature enables different versions of orchestrations to coexist and execute concurrently without conflicts.
38
38
39
-
With Orchestration Versioning:
39
+
With orchestration versioning:
40
40
- Each orchestration instance gets a version permanently associated with it when created.
41
41
- Workers running newer orchestrator versions can continue executing older version instances.
- Orchestrator functions can examine their version and branch execution accordingly.
44
44
45
45
This approach facilitates rolling upgrades where workers running different versions of your application can coexist safely. It's the recommended strategy for applications that need to support breaking changes while maintaining zero-downtime deployments.
46
-
The Orchestration Versioning feature is **[backend agnostic](./durable-functions-storage-providers.md)**, so you can leverage it regardless of what storage backend your Durable Function app is using.
47
-
For detailed configuration and implementation guidance, see [Orchestration Versioning in Durable Functions](durable-functions-orchestration-versioning.md).
46
+
The orchestration versioning feature is **[backend agnostic](./durable-functions-storage-providers.md)**, so you can leverage it regardless of what storage backend your Durable Function app is using.
47
+
For detailed configuration and implementation guidance, see [Orchestration versioning in Durable Functions](durable-functions-orchestration-versioning.md).
48
48
49
-
## Name-based Versioning
49
+
## Name-based versioning
50
50
51
51
Define new versions of your functions and leave the old versions in your function app. As you can see in the diagram, a function's version becomes part of its name. Because previous versions of functions are preserved, in-flight orchestration instances can continue to reference them. Meanwhile, requests for new orchestration instances call for the latest version, which your orchestration client function can reference from an app setting.
0 commit comments