nerdexam
GoogleGoogle

PROFESSIONAL-CLOUD-DEVELOPER · Question #255

PROFESSIONAL-CLOUD-DEVELOPER Question #255: Real Exam Question with Answer & Explanation

The correct answer is D: Modify the query that returns the product list using cursors.. https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets

Optimizing Application Performance

Question

You are a lead developer working on a new retail system that runs on Cloud Run and Firestore in Datastore mode. A web UI requirement is for the system to display a list of available products when users access the system and for the user to be able to browse through all products. You have implemented this requirement in the minimum viable product (MVP) phase by returning a list of all available products stored in Firestore. A few months after go-live, you notice that Cloud Run instances are terminated with HTTP 500: Container instances are exceeding memory limits errors during busy times. This error coincides with spikes in the number of Datastore entity reads. You need to prevent Cloud Run from crashing and decrease the number of Datastore entity reads. You want to use a solution that optimizes system performance. What should you do?

Options

  • AModify the query that returns the product list using integer offsets.
  • BModify the query that returns the product list using limits.
  • CModify the Cloud Run configuration to increase the memory limits.
  • DModify the query that returns the product list using cursors.

Explanation

https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets

Topics

#Firestore Pagination#Cloud Run Performance#Data Optimization#Memory Management

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER PracticeBrowse All PROFESSIONAL-CLOUD-DEVELOPER Questions