AWS, Azure & GCP · Cloud across providers

What are subnets and how do you design them?

MediumsubnetsvpcnetworkingUpdated Oct 2026
Quiz this track

Short answer

Subnets partition a VPC CIDR into smaller ranges placed in one availability zone. Public subnets route to an internet gateway, private subnets use NAT or private endpoints, and isolated subnets have no internet route.

A subnet is both an address range and a placement decision. Because it belongs to one AZ, a multi-AZ design needs at least one subnet per tier per zone. Routing is controlled by the route table associated with the subnet.

text
10.0.0.0/16
  10.0.1.0/24   public-a
  10.0.2.0/24   private-a
  10.0.11.0/24  public-b
  10.0.12.0/24  private-b
A simple two-AZ layout with parallel public and private tiers.

Common tiers

  • Public: load balancers and bastions, routed to an internet gateway
  • Private: application and data tiers, routed to NAT for outbound access
  • Isolated: databases and internal services with no internet route
  • Reserved: spare capacity for growth or future services

Size subnets for peak scale, not current usage. Cloud providers reserve addresses in each subnet, and container or serverless networking can consume many IPs quickly. A /24 is common for small tiers, but large node pools may need /20 or bigger.

A subnet is not a security boundary by itself. Use security groups, NACLs and route policy together, and do not assume private means unreachable.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Why does a multi-AZ design need multiple subnets per tier?
  2. 2How many IP addresses does a cloud provider reserve per subnet?
  3. 3What routing makes a subnet private rather than public?
  4. 4How would you plan subnet size for a large Kubernetes cluster?

Say it in the interview

Subnets split a VPC into smaller ranges, and each subnet lives in one availability zone. Public subnets route to an internet gateway, private subnets use NAT or private endpoints, and isolated subnets have no internet path. I design parallel tiers per AZ and size ranges for peak scale, because running out of IPs is disruptive to fix.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live AWS, Azure & GCP mock interview and get scored feedback on depth, clarity and confidence.