exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 287 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 287
Topic #: 1
[All Professional Cloud Developer Questions]

You maintain a popular mobile game deployed on Google Cloud services that include Firebase, Firestore, and Cloud Functions. Recently, the game experienced a surge in usage, and the application encountered HTTP 429 RESOURCE_EXHAUSTED errors when accessing the Firestore API. The application has now stabilized. You want to quickly fix this issue because your company has a marketing campaign next week and you expect another surge in usage. What should you do?

  • A. Request a quota increase, and modify the application code to retry the Firestore API call with fixed backoff.
  • B. Request a quota increase, and modify the application code to retry the Firestore API call with exponential backoff.
  • C. Optimize database queries to reduce read/write operations, and modify the application code to retry the Firestore API call with fixed backoff.
  • D. Optimize database queries to reduce read/write operations, and modify the application code to retry the Firestore API call with exponential backoff.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
462b75b
1 month, 1 week ago
Selected Answer: D
Exponential backoff is the best practice, so we can rule out A and C. D is probably the correct answer, but B seems plausible. The question states, "You want to quickly fix this issue because your company has a marketing campaign next week and you expect another surge in usage." You have to consider which option you can accomplish in such a short timeframe: do you request a quota increase (and hope to obtain it quickly), or rush to optimize your DB queries in a way that will have meaningful impact? Feels like a pretty close call to me, and in a real-world situation this is not so black and white.
upvoted 1 times
...
yokoyan
1 month, 1 week ago
Selected Answer: B
"You want to quickly fix" -> B. Since this is an urgent issue, I think that requesting a quota increase (B) should be prioritized. However, I think that optimizing the query (D) should be done in parallel as a long-term performance improvement.
upvoted 1 times
...
anshad666
8 months, 1 week ago
Selected Answer: D
Optimizing database queries: Reducing the number of read/write operations can prevent resource exhaustion and help Firestore handle higher traffic more efficiently. Exponential backoff: This is a best practice when handling rate-limited or resource-exhausted errors (like HTTP 429). It gradually increases the delay between retry attempts, reducing the load on the system and giving it time to recover.
upvoted 1 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 ...