Free preview · Beginner · 18 min read
Networking Mental Model: How a Packet Reaches Production
Build the end-to-end networking mental model a DevOps, SRE, and cloud engineer uses to reason about application traffic and failures.
Free preview · Beginner · 18 min read
Build the end-to-end networking mental model a DevOps, SRE, and cloud engineer uses to reason about application traffic and failures.
Computer networking becomes easier when you stop memorizing protocols and start following one packet from a client to a service and back.
A production request rarely travels directly from a browser to an application process. It may cross DNS, local routing, NAT, internet routers, a CDN, a firewall, a load balancer, Kubernetes networking, a Service, a Pod, and finally an application socket.
User / Client
↓ DNS lookup
Resolved IP / CDN / Edge
↓
Internet / private WAN
↓
Firewall / WAF / Load Balancer
↓
VPC / VNet routing
↓
VM / Kubernetes Node
↓
Container / Pod network
↓
Application socket :PORT
↓
Database / cache / API dependency
When something says "network error", ask these in order:
ss, application bind address, container port, Service targetPort.Cloud and Kubernetes networking become much clearer when you distinguish two planes:
A control-plane object can look correct while the data plane is broken. That is why production debugging requires both API inspection and packet-path verification.
North-south traffic crosses a system boundary, such as internet → application or application → SaaS API.
East-west traffic moves between internal workloads, such as API → Redis or frontend → backend.
Modern platforms usually need different controls for each path:
| Traffic | Typical controls |
|---|---|
| Internet → app | DNS, CDN, WAF, LB, ingress/gateway, TLS |
| App → app | service discovery, routing, NetworkPolicy, service mesh |
| App → database | private network, firewall, DNS, connection pool |
| App → internet | default route, NAT/egress gateway, proxy |
ip addr
ip route
ss -lntup
cat /etc/resolv.conf
These answer four foundational questions: what addresses do I have, where will packets go, what is listening, and which DNS resolver will I ask?
Then test outward:
ping -c 3 8.8.8.8
getent hosts example.com
curl -v https://example.com
A failed ping does not automatically mean the destination is down; ICMP may be blocked. Use protocol-specific tests whenever possible.