- A
Increase the provisioned throughput (RU/s) of the Cosmos DB container.
Why wrong: Permanent RU/s increase raises cost even during low traffic.
- B
Upgrade the function app to the Premium plan for dedicated instances.
Why wrong: This increases cost without directly solving throttling.
- C
Increase the function app's instance count by scaling out.
Why wrong: More instances increase concurrency, potentially causing more throttling.
- D
Implement retry logic with exponential backoff in the function code.
Retries handle transient throttling without additional cost.
Quick Answer
The answer is implementing retry logic with exponential backoff in the function code, as this is the most cost-effective way to handle Azure Cosmos DB throttling and 429 errors. Exponential backoff works by progressively increasing the wait time between retry attempts, which prevents overwhelming the database during peak traffic while allowing transient throughput spikes to subside naturally. On the AZ-204 exam, this scenario tests your understanding of how to manage Cosmos DB request unit consumption in serverless architectures, particularly under the Consumption plan where scaling out or increasing provisioned throughput would incur unnecessary costs. A common trap is choosing to increase Cosmos DB throughput or enable autoscale, but the correct approach leverages the built-in retry capabilities of the SDK or custom retry logic to handle throttling without additional expense. Memory tip: think "back off to avoid the 429 tax"—exponential backoff lets your function wait smarter, not spend more.
AZ-204 Develop Azure compute solutions Practice Question
This AZ-204 practice question tests your understanding of develop azure compute solutions. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
You are developing an Azure Functions app that processes orders. Each order triggers a function that writes to Azure Cosmos DB. You notice occasional throttling (429 errors) from Cosmos DB during peak hours. The function app uses the Consumption plan. What is the most cost-effective way to reduce throttling?
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 in the function code.
Option D is correct because implementing retry logic with exponential backoff is the most cost-effective way to handle transient 429 errors from Cosmos DB. The Azure Cosmos DB SDK already includes built-in retry policies, but custom retry logic in the function code can be tuned to match the workload, allowing the function to wait and retry during peak throttling without incurring additional costs from scaling or increasing throughput.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the provisioned throughput (RU/s) of the Cosmos DB container.
Why it's wrong here
Permanent RU/s increase raises cost even during low traffic.
- ✗
Upgrade the function app to the Premium plan for dedicated instances.
Why it's wrong here
This increases cost without directly solving throttling.
- ✗
Increase the function app's instance count by scaling out.
Why it's wrong here
More instances increase concurrency, potentially causing more throttling.
- ✓
Implement retry logic with exponential backoff in the function code.
Why this is correct
Retries handle transient throttling without additional cost.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often assume scaling the function app (Option C) or increasing Cosmos DB throughput (Option A) are the only ways to handle throttling, but they overlook that retry logic is a zero-cost, built-in mechanism that directly addresses the transient nature of 429 errors in a Consumption plan environment.
Detailed technical explanation
How to think about this question
Azure Cosmos DB uses a request unit (RU) model where each operation consumes a certain number of RUs; when the total RU consumption exceeds the provisioned throughput, the service returns HTTP 429 errors. The Cosmos DB SDKs implement automatic retry policies with exponential backoff by default (up to 9 retries with a 30-second cumulative wait), but custom retry logic in the function code can provide finer control, such as using Polly or manual retry loops, to handle transient throttling without increasing costs. In a real-world scenario, a function processing orders might experience short bursts of high traffic; retry logic allows the system to smooth out the load over time, avoiding the need to over-provision RUs or upgrade the hosting plan.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A startup's cloud architect reviews their monthly bill and notices costs are higher than expected for a long-running batch job. Switching from on-demand instances to Reserved Instances — or using Spot/Preemptible VMs — can reduce compute costs by up to 72 %. Questions like this test whether you understand the tradeoffs between commitment, flexibility, and cost across cloud pricing models.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Develop Azure compute solutions — study guide chapter
Learn the concepts, then practise the questions
- →
Develop Azure compute solutions practice questions
Targeted practice on this topic area only
- →
All AZ-204 questions
997 questions across all exam domains
- →
Microsoft Azure Developer Associate AZ-204 study guide
Full concept coverage aligned to exam objectives
- →
AZ-204 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related AZ-204 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Develop Azure compute solutions practice questions
Practise AZ-204 questions linked to Develop Azure compute solutions.
Develop for Azure storage practice questions
Practise AZ-204 questions linked to Develop for Azure storage.
Implement Azure security practice questions
Practise AZ-204 questions linked to Implement Azure security.
Connect to and consume Azure services and third-party services practice questions
Practise AZ-204 questions linked to Connect to and consume Azure services and third-party services.
Monitor, troubleshoot, and optimize Azure solutions practice questions
Practise AZ-204 questions linked to Monitor, troubleshoot, and optimize Azure solutions.
AZ-204 fundamentals practice questions
Practise AZ-204 questions linked to AZ-204 fundamentals.
AZ-204 scenario practice questions
Practise AZ-204 questions linked to AZ-204 scenario.
AZ-204 troubleshooting practice questions
Practise AZ-204 questions linked to AZ-204 troubleshooting.
Practice this exam
Start a free AZ-204 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this AZ-204 question test?
Develop Azure compute solutions — This question tests Develop Azure compute solutions — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Implement retry logic with exponential backoff in the function code. — Option D is correct because implementing retry logic with exponential backoff is the most cost-effective way to handle transient 429 errors from Cosmos DB. The Azure Cosmos DB SDK already includes built-in retry policies, but custom retry logic in the function code can be tuned to match the workload, allowing the function to wait and retry during peak throttling without incurring additional costs from scaling or increasing throughput.
What should I do if I get this AZ-204 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Keep practising
More AZ-204 practice questions
- An app must store relational state and perform transactions across multiple tables with T-SQL support. Which Azure data…
- You are monitoring an Azure App Service using Application Insights. You notice that the server response time is high for…
- Which TWO services can be used to implement a publish-subscribe messaging pattern in Azure?
- You need to monitor the CPU utilization of an Azure VM in real-time and set up an alert when it exceeds 90%. Which Azure…
- You are monitoring an Azure web application with Application Insights. You notice a sudden increase in the number of fai…
- You are monitoring an Azure web app using Application Insights. You need to create a query that returns the average dura…
Last reviewed: Jun 24, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.