Cost-effective, highly reliable web app with Cloud Load Balancing

Designing a solution infrastructure that meets technical requirements. Designing network, storage, and compute resources.

Your company wants you to build a highly reliable web application with a few public APIs as the backend. You don't expect a lot of user traffic, but traffic could spike occasionally. You want to leverage Cloud Load Balancing, and the solution must be cost-effective for users. What should you do?

  1. Store static content such as HTML and images in Cloud CDN. Host the APIs on App Engine and store the user data in Cloud SQL.
  2. Store static content such as HTML and images in a Cloud Storage bucket. Host the APIs on a zonal Google Kubernetes Engine cluster with worker nodes in multiple zones, and save the user data in Cloud Spanner.
  3. Store static content such as HTML and images in Cloud CDN. Use Cloud Run to host the APIs and save the user data in Cloud SQL. Correct Answer
  4. Store static content such as HTML and images in a Cloud Storage bucket. Use Cloud Functions to host the APIs and save the user data in Firestore.
Answer Correct 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.

Community Insight

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.

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.

Community Discussion (110 comments)

ttttttttt 👍 1 Selected: C
With D, Cloud Functions + Firestore is absolutely a plausible low-traffic, burst-friendly design. The weak point is the static content: putting HTML/images in a Cloud Storage bucket alone does not mean you’re using Cloud Load Balancing or Cloud CDN. You could put a load balancer in front of the bucket, but the option doesn’t say that. With C, every part lines up more directly with the question: Cloud CDN integrates with Cloud Load Balancing for static content, Cloud Run integrates with external HTTP(S) Load Balancing and scales down aggressively when traffic is low, and Cloud SQL is a reasonable relational datastore when the app doesn’t need something as expensive as Spanner.
ttttttttt 👍 1 Selected: C
With D, Cloud Functions + Firestore is absolutely a plausible low-traffic, burst-friendly design. The weak point is the static content: putting HTML/images in a Cloud Storage bucket alone does not mean you’re using Cloud Load Balancing or Cloud CDN. You could put a load balancer in front of the bucket, but the option doesn’t say that.
kahuja0908 👍 3 Selected: C
Cloud CDN + Cloud Run + Cloud SQL = Cost-effective, reliable, and scalable.
francisco94 👍 1 Selected: D
D correct answer
apb98 👍 3 Selected: C
C. 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.
halifax 👍 1 Selected: C
This question doesn't have a correct answer!!! Re-read the question again "You want to leverage Cloud Load Balancing" Option D doesn't come with load balancer options plus Cloud function is good for event-triggering tasks not necessarily for sustained high-traffic API endpoints. Option C can work but there is no storage provided! Cloud CDN is for Caching, NOT for permanent storage.
plumbig11 👍 2 Selected: D
This question is more about costs so Cloud storage+firestore
VegasDegenerate 👍 2 Selected: D
B is absolutely diabolical for "Cost effective"
NitinV 👍 2
As per ChatGPT , answer is C
mshafa 👍 1
xcvxcv
Diwz 👍 1
Answer is D. Solution should be cost effective and highly reliable. Cloud storage and firestore is suitable .
krokskan 👍 1 Selected: D
absolutely D because kubernetes is not cost effective. cloud functions are a better shot
convers39 👍 4 Selected: D
CDN 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.
AWS_Sam 👍 2
The correct answer with the lowest cost is D
tamer_m_Saleh 👍 2
in B) it says zonal GKE with worker nodes in multiple zones how zonal and in multiple zones?! And that 100% eliminate B
Gino17m 👍 1
"zonal" is for conrol plane, workers can be in multiple zones in multi-zone zonal cluster - the wording is just strange, see: https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-zonal-cluster Nevertheless B is still incorrect
huuthanhdlv 👍 1
CE using cloud CDN to host static contents which is incorrect.
Jconnor 👍 2
Actually it is B. Highly reliable, using Load Balancer, Spikes and several API. D is less reliable, as functions will take long to cold start and will have a time out and not using LB. The only draw back is cost.
thewalker 👍 1 Selected: D
User data in a relational database is not a good option, A B C are ruled out. Left with D - User data in Firestore.
MiguelMiguel 👍 1
D is the correct option since CDN is not for storage of html content, so you have only the option B and D. And the option B required that you have a containerezed application in other way, you can't use k8s. So the option is D.
Arun_m_123 👍 3 Selected: D
D 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
JPA210 👍 2
Cloud Spanner is expensive, so it cannot be that option.
ManishKS 👍 1
Correct Answer Is D
gary_cooper 👍 2 Selected: D
Store static content such as HTML and images in a Cloud Storage bucket. Use Cloud Functions to host the APIs and save the user data in Firestore
BiddlyBdoyng 👍 1
The user of Spanner is mad (way to expensive for the requirement). CDN is not a storage solution. I suspect the charging model of firestore is also better for this application, not to mention document databases typically preferred for storing user data.
BiddlyBdoyng 👍 1
The recommended answer is mad. Cloud Spanner for low volume occasional spike????
Atanu 👍 1
Option D doesn't says anything about load balancing. As the question says "You want to leverage Cloud Load Balancing"; maybe that's the reason to go with Option B as GKE expose cloud load balancer.
telp 👍 4 Selected: D
Answer 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.
JC0926 👍 5 Selected: C
Explanation: 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.
JC0926 👍 3
Cloud 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.
BeCalm 👍 1 Selected: D
Spanner is expensive, GCS can be used as a storage layer for static web content and it is cheaper than CDN. Why do some of these questions have obvious wrong answers?
Gofu 👍 3 Selected: A
Why not A . App engine standard can handle sudden spike in traffic
surajkrishnamurthy 👍 1 Selected: D
D is the correct answer
gonlafer 👍 4 Selected: B
Cloud functions is not for host API Cloud CDN does not store. Therefore B
megumin 👍 1 Selected: D
D is correct
Mahmoud_E 👍 1
D is correct, for global it is supported which is the case here, still in preview for internal and regional
minmin2020 👍 1 Selected: D
D for the simple reason that there is low traffic with occasional spikes. Also, Cloud CDN usually caches static content not store (wording). In addition, you can use LB's with Storage buckets. No need for multizones and expensive spanner. Therefore the only remaining option is D.
architect 👍 1 Selected: D
D is the most cost-effective and more reliable than any of the other options.
kiappy81 👍 1
the question says HIGH RELIABLE and option B uses a zonal GKE so it means that you have only 1 control plane running in one zone. besides, I think that cloud spanner is too much for user data
OctavioBatera 👍 4 Selected: B
People, 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)
OctavioBatera 👍 1
off course, i'm basing on the given information in the question.
chickennuggets 👍 1
People who voted D I am not questioning intelligence. Cloud Functions is not for API mgmt - that is Cloud endpoints and Apigee smh'
backhand 👍 2
vote D - rule out cdn - cost-effective rule out spanner
GaryGaryW 👍 2 Selected: D
D. Store static content such as HTML and images in a Cloud Storage bucket. Use Cloud Functions to host the APIs and save the user data in Firestore.
chickennuggets 👍 1
Cloud Functions isnt for APIs
AzureDP900 👍 1
D is the best answer!
chelovalpo 👍 1 Selected: D
Option D
amxexam 👍 1 Selected: B
No solution is taking about load balancing but B does manage multizonal data.Plus the data spike senario is taken care by the k8s
wilwong 👍 3 Selected: D
Cloud 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
learner311 👍 2
D. Cloud functions can host apis. Cloud Storage is globally available. Firestore is under a certain amount of io and you only pay for when you use it.
learner311 👍 1
Firestore is free*
mkc110891 👍 1 Selected: D
I think answer is very simple and it's D.
mesodan 👍 1 Selected: D
Pair Cloud Functions with Firebase Hosting to generate and serve your dynamic content or build REST APIs as microservices: https://firebase.google.com/docs/hosting/functions
ks100 👍 1 Selected: D
too many wrong answers on this site !!! should definitely be D
sjmsummer 👍 2 Selected: D
answer is D. there is a similar question in AWS test with similar answer.
lxgywil 👍 1
D is ok
OrangeTiger 👍 1
I thought B was absolutely different. Do we need a horizontal scale enough to use Spanner? The necessary effect is poor. The type of user data and whether RDB is required cannot be read from the question text. I think any ACD can be the correct answer. I hope this question will not be asked.
ehgm 👍 2 Selected: B
This question no make sense, it's just to be misleading. A and C has no difference. Technically we can reach the same result using any: - We can use Load Balance and Cloud CDN with both (App Engine or Cloud Run). - We can use split traffic with both (App Engine or Cloud Run). - We can scale to zero with both (App Engine or Cloud Run). - We can use containers with both (App Engine or Cloud Run). D. It's not a good idea use Cloud Functions to host the APIs, we will need to use the same endpoint to handle all API's functions or use a dynamic request body to deal with it or use a Cloud Functions to each functionality. C. They are using GKE (1 Region and Multi zone, reliable just on zone outage) and Cloud Spanner (Multi Region, reliable on region outage). No make sense has a DB Multi Region if your API is Single Region. Technically we can use, yes, but no make sense.
Nimeshv 👍 1 Selected: D
https://firebase.google.com/docs/hosting/functions#:~:text=Pair%20Cloud%20Functions%20with%20Firebase%20Hosting%20to%20generate,need%20to%20manage%20and%20scale%20your%20own%20servers.
kaushalajay 👍 1
When there will be spike , cloud function will create one instance for one job/hit. So if we compare cloud run and function , cloud run is less expensive.cloud function has less timeout than cloud run Also cloud function is not a reliable service to host an app. So option C.
ABO_Doma 👍 1 Selected: C
When VMs do not have external IP addresses they can only be reached by other VMs on the network, Identity-Aware Proxy's TCP forwarding feature, or by using managed VPN gateway. You can provision VMs in your network to act as trusted relays for inbound connections, also known as bastion hosts. Additionally, you can configure a Cloud NAT for network egress, or set up the interactive serial console to maintain or troubleshoot VMs without external IP addresses. Bastion Hosts have external IP so Correct answer is C.
ABO_Doma 👍 1 Selected: D
You don't expect a lot of user traffic, but traffic could spike occasionally+Cost reduction= Cloud Functions
Urban_Life 👍 1
cloud firestore (Json, document, web & mobile) vs spanner (Json, RBMS). So the answer is D
haroldbenites 👍 1
Go for C
sshetty 👍 3
Answer Should be C Cloud Run + CDN
anjuagrawal 👍 1
It is static content so it should be CDN. Hence either A or C.
anjuagrawal 👍 1
Further looking at it, CDN is networking for delivering the static content and not storing. The line says store the content, hence, it should be B or D.
vincy2202 👍 5 Selected: C
C 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
pakilodi 👍 3 Selected: D
Answer is D
pakilodi 👍 1
sorry completely changed my mind: the answer is C
fwfw 👍 1
for those choose C, is Cloud SQL good support for spike traffic?
nehaxlpb 👍 2
answer is C https://cloud.google.com/cdn#section-6
Arney 👍 1 Selected: D
Answer should be D,
MaxNRG 👍 7
Today passed the exam, I choose C Cloud CDN + Cloud Run
bishalsainju 👍 1
yeah comment ur answers in every questions, also has anyone given the exam in second attempt?
jesraj 👍 1
Bro comment ur answers in every question, it will be helpful for us
Warlock7 👍 1
You should look at this https://cloud.google.com/storage/docs/caching
ces_9999 👍 1
I think the answer is A because first App engine standard is serverless too and is less expensive than cloud run, and the other reasons that you have mentioned
pakilodi 👍 1
but the APIs could be lightweight, and that's the case of the Cloud functions. My concern is not on Cloud Run (is a cost-effective solution), but on cloud SQL, which is a lot expensive than Firestore
MaxNRG 👍 2
IMHO C. D seems reasonable at first look, but I would not go with Cloud Functions as they are not suitable in my opinion for highly reliable web applications: Cloud Functions is a lightweight compute solution for developers to create single-purpose, stand-alone functions that respond to Cloud events without the need to manage a server or runtime environment. https://cloud.google.com/functions/docs Cloud Functions is a serverless execution environment for building and connecting cloud services. With Cloud Functions you write simple, single-purpose functions that are attached to events emitted from your cloud infrastructure and services. Your function is triggered when an event being watched is fired. https://cloud.google.com/functions/docs/quickstart-python See typical use-cases: https://cloud.google.com/functions/docs/concepts/overview
MaxNRG 👍 6
B 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
parthkulkarni998 👍 1
If CF you want to use for hosting APIs why not option C. to use CloudRun? It too autoscales to 0 instances for no traffic..
turbo8p 👍 4
Can be hosted. It's cost effective since you get charged on per call basis. If no traffic then no cost will be charged.
rottzy 👍 1
why not D ? cloud spanner ~ cost effective?! that's kidding
pakilodi 👍 1
because they say that want to leverage to Google Cloud Load Balancing
amxexam 👍 4
I 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
zbyszekz 👍 3
load balancer can operate with Cloud Functions
pabloinigo 👍 2
You can have LB with cloud function, you only need to create a NEG first https://cloud.google.com/load-balancing/docs/https/setting-up-https-serverless
PeppaPig 👍 2
D 100%
AnilKr 👍 2
D, per options given, most cost-effective is GCS and Firestore
Papafel 👍 3
Yes 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.
letonphat 👍 5
IMHO CDN is not storage solution to store static html or image
diluviouniv 👍 10
Spanner is expensive
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
VishalB 👍 2
Correct Answer D - Since Cloud Run is a serverless it is more cost effective as compared to App Engine & GKE, hence A & B options gets eliminated - CDN address the latency issues whereas in Question they are mainly concerned about Load Balancing and Cost effective ,also adding Cloud CDN as service would increase the cost, so options with Cloud CDN i.e. A & C gets eliminated - Last Option left is D
VishalB 👍 2
Correct Answer is D, typo error
victory108 👍 4
D. Store static content such as HTML and images in a Cloud Storage bucket. Use Cloud Functions to host the APIs and save the user data in Firestore.
ElvinVarghese 👍 2
I believe it should be A as the question clearly says its a web application and App Engine is the preferred way to go and since App Engine can scale down to 0, it does provide the cost benefits as well.
ElvinVarghese 👍 1
I mistook the hosting APIs for application, in that sense it should be D itself.
kopper2019 👍 4
D is the way to go you can spot the answer just seeing Firestore mention for user data
PeppaPig 👍 6
CDN is not needed here. You don't need to service users globally thus latency and locality isn't critical
JeffClarke111 👍 2
D is ok
MamthaSJ 👍 5
D is correct answer.
TotoroChina 👍 55
Answer 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
mikesp 👍 8
IMHO, 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.
BrunoTostes 👍 5
but is it Cloud Functions used for hosting APIs?
dguillenca 👍 1
D not use CDN, is D correct answer?
XDevX 👍 18
IMHO 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.
tosinogunfile 👍 1
That's correct
Andrea67 👍 3
agree with u

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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

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?

Cloud CDN caches content at Google's edge locations and integrates directly with the HTTP(S) Load Balancer the question requires, delivering lower latency and higher reliability than serving straight from a bucket.

Why is Cloud Run preferred over Cloud Functions for hosting the public APIs?

Cloud Run is purpose-built for containerized HTTP services with longer request timeouts and streaming, whereas Cloud Functions targets short-lived event-driven workloads and isn't ideal for public API backends.

More PCA FAQ →

Related Analysis

Practice All PCA Questions

Access 81 questions with complete answers and detailed explanations.

View Full PCA Practice Test →

← Back to PCA Study Guide