AZ-204 · Question #99
You are developing a complex workflow by using Azure Durable Functions. During testing you observe that the results of the workflow differ based on how many instances of the Azure Function are…
The correct answer is A. Ensure that all Orchestrator code is deterministic. To resolve issues where Durable Function workflow results differ across instances, all orchestrator code must be strictly deterministic.
Question
Options
- AEnsure that all Orchestrator code is deterministic.
- BRead all state data from the durable function context
- CConfigure the Azure Our able function to run on an App Service Plan with one instance.
- DImplement the monitor pattern within the workflow.
How the community answered
(40 responses)- A75% (30)
- B5% (2)
- C8% (3)
- D13% (5)
Why each option
To resolve issues where Durable Function workflow results differ across instances, all orchestrator code must be strictly deterministic.
Durable Functions orchestrator functions must always be deterministic, meaning they produce the same output given the same input, irrespective of execution instance or replay. Non-deterministic operations, like generating random numbers or getting current time directly, can cause inconsistent results across different function instances.
While reading state data from the durable function context is correct practice, it does not inherently resolve non-deterministic logic within the orchestrator function itself.
Configuring the function to run on a single App Service Plan instance might mask the problem but does not address the underlying non-deterministic nature of the orchestrator code, which is a fundamental design requirement.
Implementing the monitor pattern is a specific Durable Functions pattern, but it is not a solution for non-deterministic orchestrator code causing inconsistent results across instances.
Concept tested: Durable Functions orchestrator determinism
Source: https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-orchestrations?tabs=csharp#orchestrator-code-constraints
Topics
Community Discussion
No community discussion yet for this question.