Cost-effective, highly reliable web app with Cloud Load Balancing
Short answer
C Store static content in Cloud CDN, host the public APIs on Cloud Run, and save user data in Cloud SQL, all behind Cloud Load Balancing.
Question
spike occasionally. You want to leverage Cloud Load Balancing, and the solution must be cost-effective for users. What should you do?
Key Takeaways
The question tests whether you can match Google Cloud's serverless, pay-per-use services to unpredictable traffic; the common trap is defaulting to always-on managed offerings like a GKE cluster or Cloud Spanner, which destroy the cost-effectiveness requirement.
This PCA scenario asks how to architect a highly reliable web application with a few public APIs, low baseline traffic, and occasional spikes, while leveraging Cloud Load Balancing and staying cost-effective. The correct answer pairs Cloud CDN for static assets, Cloud Run to host the APIs, and Cloud SQL for user data behind an HTTP(S) load balancer.
Common mistake: Learners most often pick D (Cloud Storage + Cloud Functions + Firestore) or B (GKE + Cloud Spanner). B is rejected because an always-running zonal GKE cluster plus Cloud Spanner is far too expensive for a low-traffic app, while D fails because Cloud Functions is designed for short-lived event-driven work, not public API endpoints.
Expert Analysis
Why the Answer Is Correct
Option C satisfies every constraint simultaneously. The question explicitly requires leveraging Cloud Load Balancing, and Cloud CDN is only meaningful in front of an HTTP(S) Load Balancer backend service — so static HTML and images are served from Google's edge cache, cutting latency and origin load. Cloud Run is the most cost-effective compute choice for a low-traffic API that must absorb spikes: it scales from zero, bills only per-request and per-vCPU-time, and is fully managed with multi-zone availability baked in. Cloud SQL in a regional HA configuration provides managed relational storage for user data with synchronous replication and automatic failover, delivering the "highly reliable" guarantee at a fraction of Cloud Spanner's cost. No option balances reliability, spike tolerance, load balancing, and cost as cleanly as C.
Why the Other Options Are Wrong
Option B pairs a zonal GKE cluster with Cloud Spanner, both priced for steady-state, high-throughput workloads — an always-on cluster plus a globally distributed relational database is wildly disproportionate to "a few public APIs" with occasional spikes. Option A uses Cloud CDN and Cloud SQL correctly but selects App Engine for the APIs; while App Engine Standard can scale to zero, Cloud Run is Google's current recommended serverless container platform and is more portable and typically cheaper. Option D is the strongest counter-argument in the comments because Cloud Storage is a legitimate static origin and Firestore is cheaper than Spanner, but Cloud Functions is purpose-built for short-lived, event-driven work rather than long-running or stateful public API endpoints, and Firestore is a NoSQL document store that may not fit relational user data the way Cloud SQL does.
Community Comment Notes
TotoroChina, XDevX, and diluviouniv lean toward D, with XDevX noting "you don't need Cloud Spanner just to store user data" and diluviouniv simply stating "Spanner is expensive" — both observations about B are correct but don't make D superior. MaxNRG and JC0926 push back, with vincy2202 arguing "Cloud Functions is not an apt solution to host public API's" and that "Cloud Run will take care of the odd load spikes & would be economical too." Letonphat raises a technically valid point that "CDN is not storage solution to store static html or image" — true in the strict sense, but the CDN's origin in practice is a Cloud Storage bucket, so the phrasing is exam shorthand rather than a flaw in the option.
Official Reference
- https://cloud.google.com/blog/products/networking/better-load-balancing-for-app-engine-cloud-run-and-functions
- https://cloud.google.com/load-balancing/docs/https/setting-up-https-serverless
- https://cloud.google.com/hosting-options
These links open the official vendor documentation in a new tab.
Exam Strategy
When a question combines "cost-effective," "occasional spikes," and "Cloud Load Balancing," immediately narrow to serverless options (Cloud Run, Cloud Functions) paired with an HTTP(S) load balancer. Then eliminate any choice that pairs a globally distributed database (Spanner) or always-on cluster (GKE) with low, spiky traffic — that's the cost trap.
Frequently Asked Questions
Why isn't Cloud Storage a better choice than Cloud CDN for the static content here?
Why is Cloud Run preferred over Cloud Functions for hosting the public APIs?
Discussion 108 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 30 of 108
-
TotoroChina 👍 55Answer should be D, https://cloud.google.com/load-balancing/docs/https/setting-up-https-serverless#gcloud:-cloud-functions https://cloud.google.com/blog/products/networking/better-load-balancing-for-app-engine-cloud-run-and-functions
-
XDevX 👍 18IMHO it is d), not b). Reason is that you don't need Cloud Spanner just to store user data - FireStore is the better solution. Additionally, I see no indications concerning the requirement to use GKE... Please correct me when I am wrong.
-
diluviouniv 👍 10Spanner is expensive
-
mikesp 👍 8IMHO, i agree with you. Furthermore: Cloud Storage buckets are a good choice for static web content. Cloud storage buckets behave like a CDN Network: https://cloud.google.com/storage/docs/caching So it is lower cost than CDN.
-
MaxNRG 👍 7Today passed the exam, I choose C Cloud CDN + Cloud Run
Show 25 more comments
-
MaxNRG 👍 6B is not cost-effective - GKE + Spanner is very expensive So, A or C - Cloud CDN + App Engine or Cloud CDN + Cloud Run Since Cloud Run is serverless it is more cost-effective as compared to App Engine, so C. https://cloud.google.com/hosting-options https://dev.to/pcraig3/cloud-run-vs-app-engine-a-head-to-head-comparison-using-facts-and-science-1225 Cloud CDN uses HTTP(S) Load Balancing as the origin for cacheable content. An external HTTP(S) load balancer can deliver a mix of static and dynamically-created content to users through one global IP address from the following types of backends: • Instance groups • Zonal network endpoint groups (NEGs) • Serverless NEGs: One or more App Engine, Cloud Run, or Cloud Functions services • Internet NEGs for external backends • Buckets in Cloud Storage https://cloud.google.com/cdn/docs/best-practices
-
PeppaPig 👍 6CDN is not needed here. You don't need to service users globally thus latency and locality isn't critical
-
JC0926 👍 5 Answered CExplanation: Cloud CDN: By using Cloud CDN, we can cache static content like HTML, images, and other files across Google's edge locations, which will make the delivery of the static content faster and more reliable. This will help in reducing the latency for users and also minimize the load on our web servers. Cloud Run: Cloud Run provides an easy-to-use platform for hosting stateless HTTP-driven containers. It can automatically scale up or down based on traffic demand, making it perfect for handling occasional traffic spikes. Cloud Run is also a cost-effective option since we only pay for the compute resources used when the application is running. Cloud SQL: Cloud SQL provides a managed relational database service that is highly available and scalable. It supports automatic failover and backups, ensuring that our user data is safe and available at all times.
-
vincy2202 👍 5 Answered CC is the correct answer Cloud Function is not an apt solution to host public API's. Cloud CDN along with HTTPS Load Balancer with public API's hosted on Cloud Run seems to be the perfect solution. Cloud Run will take care of the odd load spikes & would be economical too. Option A also seems to be a good solution, however Cloud Run would be a more cost effective solution as compared to App engine. https://cloud.google.com/blog/products/networking/better-load-balancing-for-app-engine-cloud-run-and-functions
-
letonphat 👍 5IMHO CDN is not storage solution to store static html or image
-
BrunoTostes 👍 5but is it Cloud Functions used for hosting APIs?
-
MamthaSJ 👍 5D is correct answer.
-
OctavioBatera 👍 4 Answered BPeople, i would go with B, and this is why: In my humble opinion, the line "...cost-effective for users" is just intended to misleanding the candidate, because if i'm a user of the web application, why should I be concerned on how expensive the infrastructure is, right? Besides, I think that A, C and D aren't valid technical solutions: A and B- Cloud CDN is for caching and delivering the content to user with low latency, but not for store it, the files would still be stored in a Cloud Storage Bucket. D - I ruled out because Cloud Functions is not optimal for host de APIs (https://cloud.google.com/blog/topics/developers-practitioners/where-should-i-run-my-stuff-choosing-google-cloud-compute-option)
-
convers39 👍 4 Answered DCDN is for caching. For static website hosting a storage bucket is a good choice, thus A and C are eliminated. B, Cloud Spanner, my nightmare. I accidentally created an empty cloud spanner and it burned like 30-40 USD per day! I got a huge amount of billing from GCP that month! No way to be cost-effective. D, Cloud Functions are good for simple API services and have no cost if not in use. SQL or NoSQL for user data is not a strong factor here, either should be fine.
-
amxexam 👍 4I would prefer CDN over Cloud Storage Bucket and Cloud function over AppEngine and Cloud Run. As per the requirement, we need LB and there is a spike in traffic, so the solution must scale. We cannot use LB with CloudFunctions. I will go with CDN and App Engine or Cloud Run, putting both through price calculator cloud run is more cost-effective. I will go with C
-
telp 👍 4 Answered DAnswer D static content html and images => cloud storage so A and B are eliminated. The b is so expensive for the need of a few call API. The cloud function can be used to answer API calls if there are a few calls and can scale if needed. For user data storage, the recommended database for google is firestore.
-
VishalB 👍 4 Correct Answer: C o For Static content such as images Cloud Storage bucket is the preferable options which is also cost effective, hence A & C option with Cloud CDN gets eliminated o Cloud Spanner is expensive solution over Firestore hence B gets eliminated, So I would go with option D
-
turbo8p 👍 4Can be hosted. It's cost effective since you get charged on per call basis. If no traffic then no cost will be charged.
-
kopper2019 👍 4D is the way to go you can spot the answer just seeing Firestore mention for user data
-
gonlafer 👍 4 Answered BCloud functions is not for host API Cloud CDN does not store. Therefore B
-
Arun_m_123 👍 3 Answered DD is the correct answer 1. Cloud CDN is not meant for storing contents. It can only cache but not act as the source-of-truth and moreover the question tells that the user traffic is less. Cloud CDN performs better when the user traffic is high 2. The spikes are very rare and the app gets low traffic most of the time. That said, putting a cluster is an expensive option. choosing a serverless supported app-platform (Cloud Run) and serverless supported DB (Firestore) makes perfect choice here to handle cost during low traffic and also handle any incoming sudden spikes
-
apb98 👍 3 Answered CC. Even though Cloud CDN is not a storage system, option C implies that static content is served through a CDN-enabled LB (usually backed by Cloud Storage). This fits well with the requirement for cost-efficiency, scalability, and LB. Option D is valid too, but it doesn’t mention LD and uses Firestore, which may not fit structured user data. Therefore, C remains the best match for Google’s exam logic.
-
JC0926 👍 3Cloud Functions: While Cloud Functions is a serverless compute platform that is easy to use, it is not ideal for hosting APIs that require long-running connections, such as WebSockets. Cloud Functions are designed to run short-lived tasks in response to events, so they may not provide the best performance for API endpoints that need to handle a lot of traffic.
-
Papafel 👍 3Yes IMO the correct answer is D. Don't need GKE and Spanner to do the job it is too expensive. Cloud Storage bucket, Cloud Functions and Firestore will do.
-
wilwong 👍 3 Answered DCloud CDN is a cache service not a Storage service, So A and C is wrong. B is not cost Effect. D is the Best choice
-
kahuja0908 👍 3 Answered CCloud CDN + Cloud Run + Cloud SQL = Cost-effective, reliable, and scalable.
-
Gofu 👍 3 Answered AWhy not A . App engine standard can handle sudden spike in traffic
-
zbyszekz 👍 3load balancer can operate with Cloud Functions
-
sshetty 👍 3Answer Should be C Cloud Run + CDN
-
Andrea67 👍 3agree with u
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All PCA Questions
Access 81 questions with complete answers and detailed explanations.
View Full PCA Practice Test →