exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 2 question 17 discussion

Actual exam question from Microsoft's AZ-204
Question #: 17
Topic #: 2
[All AZ-204 Questions]

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an HTTP triggered Azure Function app to process Azure Storage blob data. The app is triggered using an output binding on the blob.
The app continues to time out after four minutes. The app must process the blob data.
You need to ensure the app does not time out and processes the blob data.
Solution: Pass the HTTP trigger payload into an Azure Service Bus queue to be processed by a queue trigger function and return an immediate HTTP success response.
Does the solution meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
msdevanms
Highly Voted 4 years ago
Answer is correct
upvoted 66 times
piotrek1993
2 years, 9 months ago
What about sending files via Service Bus ? I guess this is not a good idea especially when maximum message size is 256 kb.
upvoted 3 times
hubekpeter
2 years ago
You are not going to send the file throu message buss, only reference to a blob, 256kB is plenty enough for that purpose.
upvoted 5 times
tom112
1 year, 6 months ago
But it's a message, not an event. There are chances that a message would contain a blob in their body, max size 256k for standard and 100MB for premium.
upvoted 1 times
...
...
...
vruizrob
2 years, 2 months ago
This link https://docs.microsoft.com/en-us/azure/azure-functions/performance-reliability#avoid-long-running-functions confirms that the correct answer is A.
upvoted 7 times
surprise0011
1 year, 7 months ago
good finding. now it is clear. IMO it not seems optimal but it is certainly a solution
upvoted 1 times
...
...
noro5
2 years, 10 months ago
Yes, the note section here confirms that https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#timeout
upvoted 2 times
...
henry1985
2 years, 4 months ago
Async request-reply pattern https://docs.microsoft.com/en-us/azure/architecture/patterns/async-request-reply#example
upvoted 2 times
...
...
Secure01
Highly Voted 4 years ago
Answer is NO. The best solution is durable functions Durable Functions provides built-in support for this pattern(Pattern #3: Async HTTP APIs), simplifying or even removing the code you need to write to interact with long-running function executions. Durable Functions provides built-in support for this pattern(Pattern #3: Async HTTP APIs), simplifying or even removing the code you need to write to interact with long-running function executions. https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp#async-http
upvoted 27 times
Figa
4 years ago
Why should this Answer be false? Can`t be both correct? They are not asking for the optimal solution.
upvoted 21 times
Cornholioz
4 years ago
You may be right. There are questions where two answers are true. I think both Durable Timers and this solution are both true.
upvoted 10 times
Cornholioz
4 years ago
But then again, can you really chunk the Blob data into multiples just so the refactored smaller function sets can process in parallel? What if the Blob data is just one huge chunk of a single transaction that has to be completed in shot even if takes long. That makes the Durable Functions the better/right/only answer :(
upvoted 1 times
tevivi8222
3 years, 8 months ago
It was timing out because you were doing a long task during HTTP request, which can't live forever. If you're saving a huge blob and it's not being done during the lifecycle of that request, the time doesn't really matter.
upvoted 1 times
...
...
...
...
rgullini
1 year, 8 months ago
Question is not asking for the BEST solution. Is asking if the provided solution will solve the issue or not, despite it is more expensive or not.
upvoted 6 times
...
xRiot007
2 years, 5 months ago
You are asked if the solution is possible, which it is, along with using Durable Functions
upvoted 2 times
...
AOE
3 years, 3 months ago
Both are correct: service bus queue or durable function async pattern
upvoted 21 times
SummerWarrior
2 years, 11 months ago
If a service bus queue trigger is used, wouldn't the function app still be timed out? The problem seems to be the processing time of the blob data.
upvoted 5 times
...
...
...
HariB1992
Most Recent 7 months, 1 week ago
Yes, the solution meets the goal. By passing the HTTP trigger payload into an Azure Service Bus queue to be processed by a queue trigger function and returning an immediate HTTP success response, you can address the timeout issue and ensure that the blob data is processed without timing out.
upvoted 1 times
...
blpiek21
8 months, 1 week ago
Selected Answer: A
Correct
upvoted 1 times
...
Isoldhe
9 months, 2 weeks ago
Selected Answer: A
Copilot AI: Yes, the solution meets the goal. Passing the HTTP trigger payload into an Azure Service Bus queue to be processed by a queue trigger function and returning an immediate HTTP success response can help you avoid the HTTP timeout issue and handle long-running operations in a serverless environment. Azure Service Bus is a fully managed message broker service that enables reliable and secure communication between applications. Azure Functions integrates with Azure Service Bus via triggers and bindings, allowing you to build functions that react to and send queue or topic messages.
upvoted 1 times
...
FeriAZ
10 months ago
Selected Answer: A
By leveraging an Azure Service Bus queue to decouple the initial HTTP request from the blob data processing, this architectural pattern effectively addresses the timeout issue. It ensures that the app can process blob data without being constrained by the execution timeout of the HTTP-triggered function, aligning well with best practices for building scalable and resilient cloud applications.
upvoted 1 times
...
Jak007
10 months, 1 week ago
Selected Answer: A
A) Yes. This is true and is a suggested approach from the documentation here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#timeout
upvoted 1 times
...
garbas
10 months, 2 weeks ago
Selected Answer: B
If you return immediate success, the app can't ensure the blob data is actually processed https://learn.microsoft.com/en-us/azure/azure-functions/performance-reliability#make-sure-background-tasks-complete
upvoted 2 times
...
bgbgvfvf
11 months, 2 weeks ago
A yes is correct
upvoted 1 times
...
AlbertoBT
1 year ago
Selected Answer: B
YES but only to ensure the app does not time out but not to processes the blob data An HTTP triggered function has a 320 seconds of max timeout and is because the HTTP request binding. So the solution only avoids having a timeout in the request but not in the processing The max timeout for any function is 4 minutes (With another kind of triggers) so the only way to be sure that the blob is processed is with a durable function The right answer is NO
upvoted 1 times
...
mlop3s
1 year ago
The problem here is “ The app must process the blob data.”. Using a queue trigger will not guarantee that the blob is processed. Asynchronous pattern will Le me ask for the status and it fails, I can resend the request. I would go for no.
upvoted 1 times
...
zreaf29
1 year ago
I think answer is B.No cause the Http trigger can take more time than four minute and it cause time out. Best way is using durable function which can check stateful
upvoted 1 times
...
Vladimir_Gajinov
1 year, 3 months ago
Selected Answer: A
The answer is YES. Regardless of the function app timeout setting, 230 seconds is the maximum amount of time that an HTTP triggered function can take to respond to a request. This is because of the default idle timeout of Azure Load Balancer. For longer processing times, consider using the Durable Functions async pattern or defer the actual work and return an immediate response. https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#timeout
upvoted 2 times
...
nardk
1 year, 3 months ago
Selected Answer: A
Answer is A
upvoted 1 times
...
Kanasan
1 year, 3 months ago
Selected Answer: A
https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#timeout For longer processing times, consider using the Durable Functions async pattern or defer the actual work and return an immediate response.
upvoted 1 times
...
longnguyendh
1 year, 4 months ago
A is correct.
upvoted 1 times
...
WuksaUK
1 year, 4 months ago
Answer is correct, the timeout time for HTTP triggers is always 230s. Since the compute time is 240s the minimum timeout for a Standard azure function that isn't from a HTTP trigger is 5 minutes. So this works
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...