exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 6 question 34 discussion

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

You develop and deploy an ASP.NET Core application that connects to an Azure Database for MySQL instance.
Connections to the database appear to drop intermittently and the application code does not handle the connection failure.
You need to handle the transient connection errors in code by implementing retries.
What are three possible ways to achieve this goal? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  • A. Close the database connection and immediately report an error.
  • B. Disable connection pooling and configure a second Azure Database for MySQL instance.
  • C. Wait five seconds before repeating the connection attempt to the database.
  • D. Set a maximum number of connection attempts to 10 and report an error on subsequent connections.
  • E. Increase connection repeat attempts exponentially up to 120 seconds.
Show Suggested Answer Hide Answer
Suggested Answer: CDE 🗳️

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
Amy_ant
Highly Voted 2 years, 7 months ago
C,D,E The first and second case are fairly straight forward to handle. Try to open the connection again. When you succeed, the transient error has been mitigated by the system. You can use your Azure Database for MySQL again. We recommend having waits before retrying the connection. Back off if the initial retries fail. This way the system can use all resources available to overcome the error situation. A good pattern to follow is: Wait for 5 seconds before your first retry. For each following retry, the increase the wait exponentially, up to 60 seconds. Set a max number of retries at which point your application considers the operation failed. https://docs.microsoft.com/en-us/azure/mysql/single-server/concepts-connectivity
upvoted 17 times
deborahQ
2 years, 6 months ago
but in E, it says increase the attempts exponentially to 120 seconds (but it might be typo). Agree if that is wait exponentially.
upvoted 1 times
...
...
Nokaido
Highly Voted 2 years, 7 months ago
Selected Answer: CDE
C, D, E are the only ones implementing retries
upvoted 8 times
...
Vichu_1607
Most Recent 5 months, 1 week ago
Selected Answer: CDE
C. Wait five seconds before repeating the connection attempt to the database. D. Set a maximum number of connection attempts to 10 and report an error on subsequent connections. E. Increase connection repeat attempts exponentially up to 120 seconds.
upvoted 1 times
...
UlrichIng
10 months, 1 week ago
Selected Answer: ACD
Instruction says Each correct answer represents part of the solution. So A. Close the database connection and immediately report an error. C. Wait five seconds before repeating the connection attempt to the database. D. Set a maximum number of connection attempts to 10 and report an error on subsequent connections.
upvoted 2 times
...
dddddd111
1 year, 6 months ago
Selected Answer: CDE
Option A ("Close the database connection and immediately report an error") is not a suitable retry strategy as it does not involve retrying the connection after a transient failure.
upvoted 1 times
...
JH81
1 year, 10 months ago
Selected Answer: CDE
C, D, E It says use retries so A and B Are not correct.
upvoted 2 times
...
AQMA
2 years, 1 month ago
Selected Answer: CDE
A transient error is an error that will resolve itself. Transient errors can occur for example when hardware or network failure happens. A best practice for designing and developing applications in the cloud is to expect transient errors. Assume they can happen in any component at any time and have the appropriate logic to handle these situations. Transient errors should be handled using retry logic. A good pattern to follow is: Wait for 5 seconds before your first retry. For each following retry, the increase the wait exponentially, up to 60 seconds. Set a max number of retries at which point your application considers the operation failed. Reference: https://learn.microsoft.com/en-us/azure/mysql/single-server/concepts-connectivity#handling-transient-errors
upvoted 1 times
...
NombreFalso
2 years, 2 months ago
Selected Answer: CDE
C, D, E because A and B are just "give up"
upvoted 2 times
...
adilkhan
2 years, 2 months ago
*C,D,E*
upvoted 3 times
...
OPT_001122
2 years, 4 months ago
Selected Answer: CDE
C, D, E
upvoted 4 times
...
at_sayali
2 years, 5 months ago
Got this in 10/2022 Went with C, D, E
upvoted 6 times
...
RochaG2
2 years, 7 months ago
Selected Answer: CDE
CDE for sure
upvoted 7 times
...
finnishr
2 years, 7 months ago
Correct answers are C, D, E
upvoted 6 times
...
Junius
2 years, 7 months ago
Given answers are correct
upvoted 4 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago