Networking
- Networking5 min read
API gateways
What an API gateway does and when you need one: a single entry point for many services, routing, authentication, rate limiting, request transformation, aggregation and the backend-for-frontend pattern, observability, gateways versus load balancers and service meshes, popular products, and pitfalls.
- Networking6 min read
CDNs explained
How content delivery networks make websites faster and more resilient: edge servers and points of presence, how requests reach the nearest edge, cache hits and misses, Cache-Control headers, cache keys and invalidation, caching dynamic content and APIs, security features, and setting one up.
- Networking6 min read
Cookies explained
How HTTP cookies work: Set-Cookie and Cookie headers, session and persistent cookies, every attribute (Domain, Path, Expires, Max-Age, Secure, HttpOnly, SameSite, Partitioned), cookie prefixes, first and third-party cookies, size limits, sessions built on cookies, and privacy rules.
- Networking6 min read
Email: SMTP, IMAP and POP3
How email travels from sender to inbox: SMTP for sending and relaying, MX records, IMAP and POP3 for reading, the ports and TLS, SPF, DKIM and DMARC for authentication and deliverability, sending email from applications through providers, testing locally with Mailpit, and why your messages land in spam.
- Networking5 min read
GraphQL explained
What GraphQL is and how it differs from REST: one endpoint, a typed schema, queries that ask for exactly the fields you need, mutations, resolvers and the N+1 problem, caching trade-offs, and when GraphQL is worth adopting.
- Networking4 min read
gRPC explained
What gRPC is and when to use it: Protocol Buffers and .proto contracts, generated client and server code, the four call types including streaming, HTTP/2 underneath, deadlines and status codes, a working Python example, and how gRPC compares with REST.
- Networking5 min read
How DNS works
What happens between typing a website's name and your browser connecting: resolvers, root, TLD and authoritative servers, record types like A, CNAME, MX and TXT, caching and TTLs, and the commands for checking it yourself.
- Networking5 min read
HTTP caching headers
A practical guide to HTTP caching: Cache-Control directives, freshness and max-age, ETag and Last-Modified validation with conditional requests and 304 responses, Vary, Expires and Pragma, recipes for static assets, HTML, APIs and private data, and how to debug caching in the browser.
- Networking5 min read
HTTP methods and status codes
The vocabulary of every web request: GET, POST, PUT, PATCH and DELETE, which are safe and which are idempotent, and the status codes from 200 to 504 that every API returns, with when to use each.
- Networking4 min read
HTTP vs HTTPS
What changes when a site moves from HTTP to HTTPS: what TLS encrypts and what it does not, how certificates prove a site's identity, the handshake in brief, HSTS and mixed content, and how to switch a site over.
- Networking5 min read
IP addresses and subnets
IP addressing made clear: the structure of an IPv4 address, subnet masks and CIDR notation, working out a subnet's range by hand, private ranges and NAT, special addresses, splitting a network into subnets as in a cloud VPC, and the basics of IPv6.
- Networking6 min read
Latency vs bandwidth
The difference between latency and bandwidth and why it matters for performance: round-trip time and the speed of light, bandwidth and throughput, the bandwidth-delay product, why a faster connection does not make most web pages load faster, measuring both, and techniques that reduce latency such as CDNs, connection reuse, fewer round trips, batching and caching.
- Networking6 min read
Load balancing algorithms
The algorithms load balancers use to choose a server, with code and trade-offs: round robin, weighted round robin, random, least connections, least response time, power of two choices, IP and consistent hashing, Maglev, and how slow start, health and connection reuse affect them in practice.
- Networking5 min read
Ports explained
What network ports are and how they work: how an IP address plus a port identifies one application, well-known, registered and ephemeral ports, the ports every developer should know, listening on localhost versus all interfaces, finding which program uses a port, firewalls, and Docker port mapping.
- Networking6 min read
Proxies and VPNs
The difference between proxies and VPNs: forward and reverse proxies, HTTP and SOCKS proxies, how a VPN tunnel works, protocols such as WireGuard and IPsec, corporate VPNs and split tunnelling, zero trust alternatives, what each actually hides, and how developers configure them.
- Networking5 min read
Rate limiting
Rate limiting from both sides of the wire: why APIs limit requests, how limits are expressed, the 429 status and Retry-After and RateLimit headers, handling limits as a client with backoff and jitter, quotas and concurrency limits, limiting at Nginx and gateways, and choosing what to key limits on.
- Networking4 min read
REST APIs explained
What makes an API RESTful: resources and URLs, HTTP methods as verbs, statelessness, representations in JSON, status codes, pagination, filtering, versioning and errors, with a worked example and the design mistakes to avoid.
- Networking5 min read
TCP vs UDP
TCP and UDP compared: connections and the three-way handshake, reliable ordered delivery, flow and congestion control, UDP's minimal datagrams, which applications use which and why, QUIC and HTTP/3 built on UDP, and a working socket example of each in Python.
- Networking6 min read
The OSI model
The seven layers of the OSI model explained with what happens when you open a web page: physical, data link, network, transport, session, presentation and application, the simpler TCP/IP model, encapsulation, which devices and protocols live at each layer, and using the layers to troubleshoot.
- Networking4 min read
WebSockets explained
How WebSockets give browsers a two-way, always-open connection to a server: the HTTP upgrade handshake, frames, a working chat example in JavaScript and Python, heartbeats and reconnection, scaling across servers, security, and when server-sent events or polling are simpler.