As asked
A company wants all application traffic to managed databases and internal APIs to stay off the public internet. Walk me through the cloud networking design.
Sample answer outline
Use private subnets for workloads and private endpoints or PrivateLink-style services for managed databases and vendor APIs that support it. Route outbound internet access through controlled egress points, not from every workload subnet, and restrict security groups or firewall rules by service identity and port. DNS matters: the application should resolve the same service name to a private address inside the VPC or VNet. Discuss overlapping CIDRs, peering limits, transit gateways, and how this changes across AWS, Azure, and GCP. Weak answers often say 'use a VPN' without addressing name resolution, routing tables, or operational debugging.
Expect these follow-ups
- How would you debug an intermittent connection timeout to a private endpoint?
- When is VPC peering the wrong answer?
- How do you prevent all traffic from hairpinning through one expensive NAT path?