Networking interview question · Most asked

Design a VPC for a three-tier web application on AWS.

Create a free account to save this page, take notes and track your progress. Sign in

Summary

A /16 from the central address plan, spread over three availability zones. Public subnets hold the load balancer and NAT gateways (one per zone); private app subnets hold compute; private data subnets hold databases. Security groups chain ALB -> app -> database by group reference. Add gateway endpoints for S3/DynamoDB, interface endpoints for other AWS APIs, and flow logs.

Longer Answer

Size app subnets for growth (/20 or larger for containers). Route tables: public subnets default to the internet gateway, private ones to the NAT gateway in the same zone. No public IPs on instances; administrative access through Session Manager rather than SSH bastions. Azure: VNet with subnets, NSGs, NAT gateway and Application Gateway; GCP: VPC with regional subnets, firewall rules, Cloud NAT and an Application Load Balancer.

Key Points

  • Three AZs, public/app/data tiers.
  • NAT per zone; IGW for public subnets.
  • Security groups by reference.
  • Endpoints and flow logs.

Deep dive: Networking Tutorial: Public and Private Subnets

Explanation

What interviewers look for

Availability across zones, least-privilege rules and room to grow.

Follow-up questions

  • How would you give the app fixed outbound IPs for partners?

More most-asked Networking questions

← All Networking questions

Was this page helpful?