Connect to and consume Azure services and third-party services →mediumMultiple ChoiceObjective-mapped
AZ-204 Practice Question: Connect to and consume Azure services and third-party services
An application uses Azure Functions with a Durable Functions extension to orchestrate a workflow. The workflow calls multiple external APIs. The developer needs to handle transient failures when calling these APIs. Which pattern should the developer implement?
⚠ Common exam trap
Candidates often confuse the circuit breaker pattern with retry logic, but circuit breakers are for preventing cascading failures in long-term outages, not for handling transient failures with exponential backoff.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Implement retry logic with exponential backoff
Durable Functions provides built-in support for automatic retry with exponential backoff via the `CallActivityWithRetryAsync` method or by configuring retry policies in orchestrator functions. This pattern is specifically designed to handle transient failures when calling external APIs, as it automatically retries failed operations with increasing delays, reducing load on the downstream service and improving resilience.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Implement retry logic with exponential backoff
Why this is correct
Durable Functions orchestrations are inherently stateful and resilient, making them ideal for implementing robust retry logic. Exponential backoff is a crucial strategy for handling transient failures, where retries are attempted with progressively longer delays between attempts. This prevents overwhelming the failing service and allows it time to recover, significantly improving the reliability of long-running operations within a durable orchestration. It's a best practice for distributed systems to manage intermittent issues effectively.
- ✗
Use a saga pattern
Why it's wrong here
The Saga pattern is a design pattern used to manage distributed transactions that span multiple services, ensuring data consistency across independent components. It achieves this by orchestrating a sequence of local transactions, each with a corresponding compensating transaction to undo previous changes in case of failure. While it handles failures by rolling back, its primary purpose is transactional integrity across services, not to re-attempt a failed operation due to transient issues.
- ✗
Use a request-reply pattern
Why it's wrong here
The request-reply pattern is a fundamental messaging interaction where a sender sends a message and then waits for a response from the receiver. It defines a communication style, ensuring that a client receives an acknowledgment or result for its request. While essential for many synchronous or asynchronous interactions, this pattern itself does not inherently provide mechanisms for automatically retrying failed requests or handling transient errors; it merely describes the exchange of messages.
- ✗
Use a circuit breaker pattern
Why it's wrong here
The Circuit Breaker pattern is designed to prevent an application from repeatedly trying to invoke a service that is likely to fail, thereby conserving resources and allowing the service time to recover. When a service experiences a certain number of failures, the circuit "trips," and subsequent calls are immediately rejected without attempting to contact the failing service. While it helps manage cascading failures, its purpose is to stop calls to a failing service, not to retry them with increasing delays.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
Learn chapter
Azure Functions Development
Key term
Durable Functions
Durable Functions is an extension of Azure Functions that lets you write stateful workflows in code, managing complex sequences of tasks, retries, and delays automatically.
Key term
Azure Functions Bindings
Azure Functions Bindings are declarative connections that link your serverless function code to Azure services or external resources, handling input and output data automatically without writing extra networking or authentication code.
About these practice questions
One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.