hardMultiple ChoiceObjective-mapped
PCSE Practice Question: Designing a multi-tier application with a…
You are designing a multi-tier application with a frontend and backend. The frontend instances are in subnet A (10.0.1.0/24), and the backend instances are in subnet B (10.0.2.0/24). Both subnets are in the same VPC. You want to allow the frontend to communicate with the backend on TCP port 8080, but the backend must not be able to initiate connections to the frontend. Additionally, the backend must be able to send patches to the internet. Which set of firewall rules should you implement?
⚠ Common exam trap
Google Cloud often tests the distinction between ingress and egress rules and the direction of traffic flow; the trap here is that candidates mistakenly place the ingress rule on the frontend (thinking it needs to 'receive' the connection) instead of on the backend, which actually receives the connection from the frontend.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Ingress rule on backend: allow tcp:8080 from subnet A; Egress rule on backend: allow all to internet
The frontend in subnet A initiates connections to the backend on TCP port 8080, so an ingress rule on the backend allowing traffic from subnet A permits this. An egress rule on the backend allowing all traffic to the internet enables patch downloads. This setup prevents the backend from initiating connections to the frontend, as no egress rule on the backend targets the frontend, and no ingress rule on the frontend allows unsolicited traffic from the backend.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Ingress rule on frontend: allow tcp:8080 from backend's service account; Egress rule on backend: allow all to internet
Why it's wrong here
Ingress rules on the frontend control inbound traffic to the frontend, but the requirement is to block the backend from initiating connections to the frontend, which is enforced by an egress rule on the backend denying outbound traffic to the frontend’s subnet. This option is tempting because service-account-based ingress rules are commonly used to restrict access to a specific source, such as allowing backend traffic to a frontend’s port, but they cannot prevent the backend from initiating outbound connections—only an egress rule on the backend can block that initiation.
- ✓
Ingress rule on backend: allow tcp:8080 from subnet A; Egress rule on backend: allow all to internet
Why this is correct
Correct: Ingress on backend allows frontend-initiated traffic only. Egress on backend allows backend to reach internet for patches. No rule allows backend to initiate to frontend.
- ✗
Ingress rule on frontend: allow tcp:8080 from subnet B; Egress rule on backend: allow all to internet
Why it's wrong here
Ingress rule on frontend would allow backend to initiate to frontend, which is not allowed. The requirement is backend cannot initiate to frontend.
- ✗
Ingress rule on backend: allow tcp:8080 from subnet A; Egress rule on frontend: deny all to internet
Why it's wrong here
Egress rule on frontend is not needed. The rule should allow backend to access internet, not frontend.
Visual reference
Go deeper
Related to this question
About these practice questions
This PCSE question is part of Courseiva's 960-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCSE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCSE exam.