Topic 1 Question 259
You are a lead developer working on a new retail system that runs on Cloud Run and Firestore. A web UI requirement is for the user to be able to browse through all products. 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 Firestore queries.
You need to prevent Cloud Run from crashing and decrease the number of Firestore queries. You want to use a solution that optimizes system performance. What should you do?
Modify the query that returns the product list using cursors with limits.
Create a custom index over the products.
Modify the query that returns the product list using integer offsets.
Modify the Cloud Run configuration to increase the memory limits.
ユーザの投票
コメント(1)
- 正解だと思う選択肢: A
A cursor is a pointer to a specific location in a Firestore database. By using cursors with limits, you can control the number of documents that are returned in a query. This can help to reduce the number of Firestore queries that are made, which can improve performance and prevent Cloud Run from crashing.
👍 1Writer2023/04/26
シャッフルモード