nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #304

You maintain a popular mobile game deployed on Google Cloud services that include Firebase, Firestore, and Cloud Run functions. Recently, the game experienced a surge in usage, and the application enc

The correct answer is D. Optimize database queries to reduce read/write operations, and modify the application code to. HTTP 429 RESOURCE_EXHAUSTED errors indicate the application is hitting Firestore quota limits. Option D is correct because it addresses the root cause (reducing actual read/write operations through query optimization) AND adds resilience via retry logic with truncated exponential

Optimizing application performance and scalability

Question

You maintain a popular mobile game deployed on Google Cloud services that include Firebase, Firestore, and Cloud Run 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?

Options

  • ARequest a quota increase, and modify the application code to retry the Firestore API call with
  • BRequest a quota increase, and modify the application code to retry the Firestore API call with
  • COptimize database queries to reduce read/write operations, and modify the application code to
  • DOptimize database queries to reduce read/write operations, and modify the application code to

How the community answered

(18 responses)
  • A
    6% (1)
  • C
    17% (3)
  • D
    78% (14)

Explanation

HTTP 429 RESOURCE_EXHAUSTED errors indicate the application is hitting Firestore quota limits. Option D is correct because it addresses the root cause (reducing actual read/write operations through query optimization) AND adds resilience via retry logic with truncated exponential backoff with jitter - the Google-recommended retry strategy. Options A and B only request a quota increase without fixing the underlying inefficiency; a quota increase alone is not guaranteed to be approved quickly and doesn't prevent future exhaustion if the query volume keeps growing. Option C likely pairs optimization with a less effective retry strategy (e.g., linear backoff). Truncated exponential backoff with jitter prevents thundering herd problems where many clients retry simultaneously, which would worsen the quota issue.

Topics

#Firestore#Database Optimization#Error Handling#Scalability

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice