Network segmentation for the non-network engineer
Network segmentation is often discussed abstractly. Here's what it looks like when you actually implement it.
The layers
Layer 0: account / subscription boundary
Separate environments in separate accounts (AWS) / subscriptions (Azure) / projects (GCP). Networking is siloed by default.
Layer 1: VPC / VNet boundary
Separate networks per environment. No default connectivity between them. Intentional peering where needed.
Layer 2: subnet boundary
Public vs private subnets. Private subnets for databases, internal services. Public only for ingress (ALB, NAT gateway).
Layer 3: security group / NSG
Explicit allow-lists. Deny everything else. Most common failure point.
Layer 4: service-to-service authorization
The app layer. mTLS, JWT, or equivalent. "Service A is allowed to call service B's endpoint X, not endpoint Y."
Layer 5: pod / container network policy (if on Kubernetes)
Network policies limit pod-to-pod traffic. Calico, Cilium.
The incremental path
If you have none of this today, start here:
Month 1: separate accounts
Move non-prod and prod into separate accounts. Huge win for blast radius.
Month 2: strict security groups in prod
Review every production security group. Lock down to specific CIDRs and ports. Nothing allows 0.0.0.0/0 inbound unless it's a public-facing LB.
Month 3: VPC endpoints for AWS services
Stop routing internal traffic to S3, DynamoDB, etc. through NAT/IGW. Use VPC endpoints. Faster, cheaper, more secure.
Month 4+: service mesh if appropriate
Don't jump to service mesh unless you have 20+ services. Premature mesh adoption is a trap.