1. Walk me through the architectural differences between VPC Service Controls and VPC-SC perimeters versus traditional firewall rules in GCP. When would you recommend one over the other for a regulated financial services customer?
VPC Service Controls create a security perimeter around Google Cloud services themselves (not network traffic), preventing data exfiltration through API calls even if credentials are compromised, whereas firewall rules operate at the network layer. For financial services, VPC-SC is superior when you need to enforce that sensitive data in BigQuery or Cloud Storage cannot be accessed from outside approved projects, regardless of authentication; firewall rules alone cannot prevent an authenticated user from copying data. I'd recommend VPC-SC for data residency and compliance (PCI, HIPAA) and firewall rules for lateral movement prevention and DDoS mitigation. The key trade-off is that VPC-SC requires careful configuration of access levels and policies, and not all GCP services support it yet.
2. A customer has three VPCs in different regions that need to share a centralized logging and monitoring infrastructure in a hub VPC. Design a network topology that minimizes latency and cost while ensuring the spokes cannot communicate directly with each other.
Implement a hub-and-spoke topology using VPC peering from each spoke VPC to the central hub VPC, with firewall rules in the hub that deny traffic between spoke subnets. Route all inter-spoke traffic through the hub by configuring custom routes with next-hop set to internal load balancers or Cloud NAT gateways in the hub; this prevents direct peering between spokes while centralizing security policy and observability. Use Shared VPC if the spokes are in the same organization to simplify IAM and billing, otherwise use VPC peering with export/import of custom routes. This design avoids the cost and operational complexity of deploying VPN gateways or Cloud Interconnect while maintaining network isolation and enabling centralized Cloud Logging and Cloud Monitoring via shared logging sinks.
3. Explain the difference between using Cloud NAT versus configuring private Google access for a GCP workload that needs to pull container images from Artifact Registry but has no public IP address.
Private Google Access (PGA) allows instances with only private IPs to reach Google APIs (including Artifact Registry) via internal routes without leaving the Google network; Cloud NAT translates outbound traffic to a public IP, which incurs egress charges and exits the Google network. For pulling container images, PGA is the correct choice because it is free, faster (no NAT translation overhead), and more secure (traffic never touches the public internet). Cloud NAT is necessary only if workloads need to reach external, non-Google services like GitHub or third-party APIs. A senior architect should recognize that enabling PGA in a subnet is as simple as setting privateIpGoogleAccess to true on the subnet resource and requires no additional infrastructure.
4. You are designing a multi-tenant SaaS platform in GCP where each customer gets an isolated environment. Should you use Shared VPC, separate VPCs per tenant, or a combination? What are the security, operational, and cost implications of each approach?
Separate VPCs per tenant offer the strongest blast radius isolation and are easiest to audit, but create operational overhead and make cross-tenant shared services difficult to implement. Shared VPC with separate projects per tenant provides centralized network management, simpler shared infrastructure (like a central Cloud NAT or logging sink), and lower operational cost, but requires careful IAM and firewall policy design to prevent accidental cross-tenant access. A hybrid approach—Shared VPC for core infrastructure (Cloud NAT, Cloud Load Balancer, logging) and separate projects for tenant workloads with strict service account scoping—is optimal for SaaS platforms. The key trade-off is that Shared VPC simplifies ops but demands stronger engineering discipline; separate VPCs are simpler to secure but costly to manage at scale.
5. A customer's legacy on-premises applications need to communicate with GCP VMs over a private connection with sub-100ms latency. Should you recommend Cloud Interconnect, Cloud VPN, or Hybrid Connectivity? Justify the choice with technical and business constraints.
Cloud Interconnect (dedicated connection) is the only option that guarantees sub-100ms latency because it provides a direct physical circuit to Google's network with SLA-backed performance; Cloud VPN traverses the public internet and typically adds 50-200ms of additional latency due to encryption and routing. Cloud Interconnect pricing is higher (monthly commitment) but is justified if the workload requires consistent low latency, mission-critical uptime, or large throughput (>1Gbps sustained). For legacy applications where sub-100ms is a hard requirement, Cloud Interconnect at a nearby Google Cloud region colocation point is non-negotiable. The alternative—Cloud VPN for development/test and Interconnect for production—is a common hybrid approach to manage costs while meeting SLA requirements.
6. How would you troubleshoot a situation where traffic from a GCP VM to an on-premises service via Cloud VPN is timing out intermittently, but pings work fine?
Check three things in sequence: first, verify that the VPN tunnel status is up using gcloud compute vpn-tunnels describe and ensure both the tunnel and gateway are 'up'; second, confirm that the BGP route advertisements match your expectations using gcloud compute routers describe and check that custom routes are exported from the on-premises side; third, examine firewall rules on both sides—ping (ICMP) may succeed but application ports may be blocked by on-premises egress rules or GCP ingress rules. Enable VPC Flow Logs on the subnet to capture whether packets are being dropped; if flows show traffic arriving but not exiting, suspect an on-premises firewall. Intermittent timeouts often indicate tunnel flapping (check for CPU saturation on the VPN gateway or MTU mismatches) or asymmetric routing where return traffic takes a different path and hits firewall rules.
7. Describe the order of evaluation for GCP firewall rules and explain why rule priority and direction matter. Provide an example where a misconfigured rule order causes a real security issue.
GCP evaluates firewall rules in ascending priority order (lowest number evaluated first), and the first matching rule determines the action; if no rule matches, the default deny-ingress or allow-egress applies based on direction. Rule direction (ingress vs. egress) is crucial because an ingress rule can only filter incoming traffic and vice versa; a common mistake is creating an egress rule expecting to block outbound data exfiltration, only to discover that the default allow-egress overrides it. A real example: a junior engineer creates a rule priority 1000 to block egress to 0.0.0.0/0 on port 443, intending to prevent data exfiltration, but if a priority 100 rule already allows egress to 0.0.0.0/0, the lower-priority allow rule fires first and the higher-priority deny rule is never evaluated. The fix is to lower the deny rule's priority number (e.g., priority 50) to ensure it evaluates before the allow rule.
8. A customer wants to ensure that all traffic between their GCP VMs and on-premises systems is encrypted in transit. Their on-premises network uses standard IPsec but can also support mTLS at the application layer. Which approach would you recommend and why?
IPsec via Cloud VPN provides transport-layer encryption for all traffic without application changes, making it simpler to deploy across heterogeneous workloads; mTLS provides application-layer encryption and better granularity (you can encrypt specific connections or enforce per-service policies) but requires code changes and certificate management. For a customer prioritizing minimal application refactoring and compliance (e.g., HIPAA requiring encryption in transit), Cloud VPN is the pragmatic choice because it encrypts everything transparently and works with any protocol. However, mTLS should be layered on top for sensitive data flows (like database connections) to achieve defense-in-depth and meet zero-trust architectural goals. A senior architect should recommend VPN as the baseline (cheap, transparent, non-negotiable) and mTLS as an additional control for high-value services.
9. Explain how you would design a VPC network that supports both strict network segmentation (using subnets and firewall rules) and microsegmentation (using GKE network policies). What are the trade-offs?
Network segmentation via subnets and firewall rules operates at the IP layer and scales to thousands of rules but requires centralized management and doesn't understand application-layer concepts. Microsegmentation using GKE network policies (built on Kubernetes NetworkPolicy) enforces pod-to-pod or namespace-to-namespace rules and is dynamic (automatically applies to new pods) but only works within GKE and requires Dataplane V2 (eBPF-based enforcement) for performance. The optimal design layers both: use subnets to separate environments (dev/staging/prod) and firewall rules to prevent egress to untrusted networks, then deploy GKE network policies within each environment to enforce pod-level access controls. The trade-off is operational complexity; a misconfigured network policy can silently break pod communication, so you need observability (GKE audit logs, VPC Flow Logs) to troubleshoot.
10. A customer's VPC uses custom routes to direct traffic to a Cloud Load Balancer health-check probe from a third-party monitoring service. The health checks are failing intermittently. What might be the root cause and how would you fix it?
The most likely issue is that the custom route's priority is lower than the default route, so the health-check probe traffic is being routed via the default route instead of the intended load balancer backend; or the backend instances' firewall rules are blocking the monitoring service's source IP. First, verify route priority using gcloud compute routes list and ensure the custom route has a lower metric (higher priority) than competing routes. Second, examine the backend instances' firewall rules to confirm they allow ingress from the monitoring service's IP range; if the monitor is external, you may need to allow traffic from the load balancer's health-check IP range (e.g., 35.191.0.0/16 for Google Cloud health checks). A third possibility is MTU mismatch on the path, causing health-check packets to be fragmented; ensure that the network path supports at least 1460-byte payloads.
11. You are migrating a monolithic application from on-premises to GCP. The application has strict latency requirements (p99 < 50ms) and is currently deployed across multiple on-premises data centers. Design a VPC and connectivity architecture that meets these requirements while maintaining active-active redundancy.
Deploy the application in two or more GCP regions, each with its own VPC, connected via VPC peering or Cloud Interconnect depending on the required bandwidth and latency SLA. Use Cloud Interconnect (dedicated connection) to link each GCP region to the nearest on-premises data center (colocation point) to minimize latency; if Interconnect is unavailable, fall back to Cloud VPN as a secondary path. Implement a global Cloud Load Balancer or Cloud Armor to distribute traffic across regional backends based on geographic proximity and health; configure regional backends to fail over within the same region first (lower latency) before shifting traffic to other regions. For active-active between on-premises and GCP, ensure that the primary database is replicated in near-real-time (e.g., using Cloud Spanner for global ACID guarantees or eventual-consistency with Cloud Pub/Sub) and that both sites can serve reads and writes. This design trades cost (multiple regions + Interconnect circuits) for resilience and low latency.
12. A customer has created 50 firewall rules in their VPC and is experiencing difficult-to-diagnose traffic issues. How would you recommend organizing and auditing these rules to ensure they are secure, maintainable, and performant?
Use a naming convention that encodes the rule's purpose, direction, and priority into the name (e.g., 'allow-ingress-ssh-from-bastion-0100') to make the intent clear and aid sorting; store rule definitions in Terraform or a configuration management tool with change tracking so you can audit who changed what and when. Implement a rule hierarchy: begin with explicit deny rules (lowest priority numbers) for untrusted sources, then add allow rules by function (bastion, load balancer, inter-service traffic), and end with a default deny-all rule to catch unintended traffic. Use VPC Flow Logs with sampling set to 100% for the affected subnet to capture actual traffic and identify rules that match or don't match; query these logs in BigQuery to find unused rules (no matching flows in 30 days) and remove them. Document each rule's business justification and review them quarterly; use GCP's audit logs (Cloud Audit Logs) to track rule creation and modifications. A mature practice is to assign rule ownership to teams and use labels (e.g., labels.owner=platform-team) to enforce accountability.


