0
0
Azurecloud~20 mins

Durable Functions for workflows in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Durable Functions Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
What happens when an activity function fails in a Durable Function orchestration?

Consider a Durable Function orchestration that calls multiple activity functions sequentially. If one activity function throws an exception, what is the default behavior of the orchestration?

AThe orchestration retries the failed activity function based on configured retry policies, then fails if retries are exhausted.
BThe orchestration immediately terminates and marks the entire workflow as failed.
CThe orchestration retries the failed activity function indefinitely until it succeeds.
DThe orchestration pauses and waits for manual intervention before continuing.
Attempts:
2 left
💡 Hint

Think about how Durable Functions handle transient failures with retry policies.

Architecture
intermediate
2:00remaining
Which pattern best describes Durable Functions orchestrations?

Durable Functions orchestrations are designed to manage workflows that require stateful coordination of multiple steps. Which architectural pattern do they best represent?

AEvent-driven microservices pattern
BMonolithic application pattern
CSaga pattern for managing distributed transactions
DClient-server request-response pattern
Attempts:
2 left
💡 Hint

Consider how Durable Functions help manage long-running transactions and compensations.

Configuration
advanced
2:00remaining
What is the correct way to configure a retry policy for an activity function in Durable Functions?

You want to configure an activity function to retry up to 3 times with a 5-second delay between retries. Which code snippet correctly sets this retry policy in C#?

Azure
var retryOptions = new RetryOptions(TimeSpan.FromSeconds(5), 3);
await context.CallActivityWithRetryAsync("ActivityName", retryOptions, input);
A
var retryOptions = new RetryOptions(TimeSpan.FromSeconds(3), 5);
await context.CallActivityWithRetryAsync("ActivityName", retryOptions, input);
B
var retryOptions = new RetryOptions(TimeSpan.FromSeconds(5), 3);
await context.CallActivityWithRetryAsync("ActivityName", retryOptions, input);
C
var retryOptions = new RetryOptions(3, TimeSpan.FromSeconds(5));
await context.CallActivityWithRetryAsync("ActivityName", retryOptions, input);
D
var retryOptions = new RetryOptions(5, TimeSpan.FromSeconds(3));
await context.CallActivityWithRetryAsync("ActivityName", retryOptions, input);
Attempts:
2 left
💡 Hint

Check the order of parameters in the RetryOptions constructor: first delay, then max attempts.

security
advanced
2:00remaining
How should secrets be managed in Durable Functions to follow best security practices?

You have sensitive connection strings and API keys used by your Durable Functions. What is the best practice to manage these secrets securely?

AUse Azure Key Vault to store secrets and access them securely at runtime.
BEmbed secrets in the Durable Function orchestration code as constants.
CStore secrets directly in the function app settings as plain text.
DStore secrets in a database table accessible by the Durable Function.
Attempts:
2 left
💡 Hint

Think about centralized secret management services designed for security.

🧠 Conceptual
expert
2:00remaining
What is the effect of the 'ContinueAsNew' method in a Durable Function orchestration?

In a long-running Durable Function orchestration, you call the method context.ContinueAsNew(input). What happens to the orchestration's state and execution?

AThe orchestration saves its current state and continues execution without resetting or restarting.
BThe orchestration pauses and waits for an external event before continuing with the same state.
CThe orchestration forks a parallel execution path with the new input while keeping the original state intact.
DThe orchestration completes immediately and triggers a new orchestration instance with the same instance ID and new input, resetting its state.
Attempts:
2 left
💡 Hint

Consider how to reset an orchestration's state while keeping the same instance ID.