Hey Cloud Devs,
I’ve been exploring ways to reduce API latency for real-world applications hosted on Google Cloud Run and Firestore. Recently, I experimented with a live dataset similar to what a brand like Dunkin Donuts Menu might use—dynamic content that updates frequently (e.g., new drink listings, breakfast items, etc.).
During the test, I noticed that cold starts on Cloud Run containers added around 1.2s latency, which became more noticeable when the app pulled multiple image assets. After enabling concurrency and switching to Firestore in “Datastore mode,” response times dropped significantly.
Here’s what helped improve the overall performance:
-
Using Cloud Run revisions with minimal image layers. -
Index tuning in Firestore for faster read queries. -
Cloud CDN for caching static assets like menu images. -
Implementing async batch requests to reduce blocking calls.
I’m curious to hear how others have optimized similar dynamic datasets or eCommerce-style APIs using Google Cloud.
Has anyone experimented with App Engine vs Cloud Run for similar real-time updates?
Would love to discuss best practices around caching strategies and cost management for frequently updating content.
Thanks in advance,