BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Professional Cloud Developer Exam - Topic 14 Question 75 Discussion

Posted by Deandrea on Jan 26, 2024 at 06:23 PM

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 alt 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?

Suggested Answer: B

Get Premium Professional Cloud Developer Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
27 comments · newest first
MI
Mila 12 months ago
Wait, are we really hitting memory limits? That's unexpected!
BE
Bettye 1 year ago
I disagree, using integer offsets can lead to performance issues.
MA
Maybelle 1 year ago
A custom index could help optimize queries too!
LO
Lourdes 1 year ago
Isn't increasing memory limits just a band-aid solution?
LE
Lelia 1 year ago
I think modifying the query with cursors is the way to go.
KR
Krissy 1 year ago
I practiced a similar question where using limits on queries helped reduce load, so I’m leaning towards modifying the query with cursors.
SH
Sharika 1 year ago
I feel like creating a custom index could improve query performance, but I’m not entirely sure how that interacts with memory issues.
TW
Twana 1 year ago
I think increasing the memory limits for Cloud Run could help, but it might just be a temporary fix. We should really focus on optimizing the queries.
TA
Tasia 1 year ago
I remember we discussed optimizing Firestore queries in class, but I'm not sure if using cursors or offsets is better for performance.
DO
Dominic 1 year ago
Modifying the query to use integer offsets instead of cursors is an interesting idea, but I'm not sure if that will have the same performance benefits. I'll need to weigh the pros and cons of each approach.
GR
Gracia 1 year ago
Creating a custom index over the products could help speed up the queries, but I'm not sure if that alone will be enough to prevent the Cloud Run instances from crashing. I'll need to consider a more comprehensive solution.
SU
Sunshine 1 year ago
Cursors with limits sounds like a good way to optimize the Firestore queries and reduce the load on the system. I'll make sure to research that approach in more detail.
VA
Vallie 1 year ago
Hmm, the memory limits issue on Cloud Run is definitely the key problem to address here. I'm leaning towards modifying the Cloud Run configuration to increase the memory limits.
NO
Noe 1 year ago
This seems like a tricky one. I'll need to think through the different options carefully to figure out the best approach.
DU
Dulce 1 year ago
Okay, I remember learning that IPv4 addresses are made up of 4 octets, each 8 bits long. So the total length must be 32 bits. I'll select A.
VE
Verda 1 year ago
Okay, I think I've got it. The key is in the "type of database use" column - it says "application data access only", so the database can't be used for certain other purposes.
RU
Ruth 3 years ago
Hmm, I don't know. I'm kind of partial to option C. Sure, it might not be the most sustainable solution, but it could buy us some time to figure out a better long-term strategy. And let's be real, sometimes you just gotta do what you gotta do to keep the system running, you know?
EL
Elmira 3 years ago
You know, I was thinking the same thing, Jannette. Using cursors and limits is probably the way to go. It's more efficient than relying on offsets, and it should help keep those Firestore queries under control.
WI
Wilda 3 years ago
↳ replying to Elmira
Agreed, let's go ahead and implement the solution and keep an eye on the system's performance.
EZ
Ezekiel 3 years ago
↳ replying to Elmira
Let's make the changes and monitor the performance to see if it helps with the memory limits issue.
MA
Mary 3 years ago
↳ replying to Elmira
Definitely, optimizing the queries will benefit the overall system in the long run.
MI
Micheal 3 years ago
↳ replying to Elmira
I'm on board with that plan, it seems like the most efficient way to handle the situation.
KR
Krystal 3 years ago
↳ replying to Elmira
Sounds good to me, let's implement that solution to prevent Cloud Run from crashing during busy times.
TH
Theodora 3 years ago
↳ replying to Elmira
I agree, it will help optimize the system performance and reduce the number of Firestore queries.
LO
Lottie 3 years ago
↳ replying to Elmira
I think we should go with option B and modify the query with cursors and limits.
JA
Jannette 3 years ago
I'm leaning towards option B. Modifying the query to use cursors and limits could help reduce the load on Firestore and prevent those memory issues on Cloud Run. Plus, it seems like a more elegant solution than just throwing more resources at the problem.
NO
Noemi 3 years ago
Ugh, this question is tricky. I'm not sure if I should go with option B or C. Increasing the memory limits on Cloud Run might help, but I'm worried that won't be a long-term solution if the Firestore queries are the real issue.
0/2000 characters

Save Cancel