practice

Subnet Sizing

Choosing subnet prefix lengths with enough headroom, given that subnets cannot be resized and cloud providers reserve several addresses in each.

subnetsaddressingcapacity

A /24 gives 256 addresses, of which cloud providers typically reserve five, leaving 251. That sounds ample until a container platform assigns an address per pod rather than per node — at which point a single node can consume dozens.

The rule: size for the five-year worst case, because addresses inside a private range cost nothing and resizing is impossible. Erring large is free; erring small is a migration.

Structure worth adopting: a consistent prefix per tier per zone — for example /20 per zone for the application tier where pod-per-address networking is used, /24 for data, /26 for public subnets holding only load balancers and NAT gateways.

And remember multi-AZ means one subnet per zone per tier, so a three-tier, three-zone design needs nine subnets carved from the VPC range before anything else is allocated.