Track N
Networking, under the hood
The full life of a request: from fetch() in your code down to packets, and back.
- What happens when you fetch()
Follow one fetch() call all the way down — the work the browser does before any packet leaves, DNS, TCP, TLS, the raw request bytes, and the exact moment await res.json() resolves.
14 min - DNS: how a name becomes an address
The lookup chain that turns api.hisaab.measdev.me into an IP — stub resolver to root to TLD to authoritative — plus caching, TTLs, the record types you actually use, why it rides UDP, and why "propagation" is a lie.
15 min - TCP: the connection under everything
How TCP turns a network that loses, reorders, and duplicates packets into the ordered reliable byte stream every fetch depends on — the three-way handshake byte by byte, what a connection physically is, flow vs congestion control and why a cold connection starts slow, retransmission and head-of-line blocking, and MSS/MTU.
16 min - TLS: how the padlock works
What the 's' in https actually buys you — confidentiality, integrity, and authenticity as three separate guarantees — how asymmetric and symmetric crypto combine, the TLS 1.3 one-round-trip handshake byte by byte, what a certificate really is and why your browser trusts it, SNI, session resumption and 0-RTT's replay caveat, and exactly what the padlock does and does not promise.
16 min - HTTP/1.1 → 2 → 3: why the protocol keeps changing
The same request, three transports. Why HTTP/1.1 could only have one request in flight per connection and the hacks that bred, how HTTP/2 multiplexed everything over one TCP stream but inherited TCP's head-of-line blocking, and why HTTP/3 threw out TCP entirely for QUIC over UDP — per-stream loss recovery, a folded-in TLS handshake, and a connection that survives switching from wifi to 4G.
15 min - Sockets & the kernel: what the server sees
The other end of every fetch — what a socket actually is (a file descriptor), the five syscalls a server makes to accept a connection, what the kernel's accept queue and "backlog" mean, why the obvious thread-per-connection design collapsed at 10,000 connections (C10K), how select gave way to epoll/kqueue, and exactly how Node's single event loop maps onto all of it — including why one slow synchronous handler freezes every user at once.
16 min - Connection pooling & keep-alive
Why the first request to a host is so much more expensive than the second — the full DNS + TCP + TLS round-trip bill before byte one — and how everyone from your browser to your ORM avoids paying it repeatedly. HTTP keep-alive, browser connection pools, why databases are far worse (a whole process per connection), client pools vs server-side poolers like PgBouncer, and the counterintuitive result that a *smaller* pool is often faster.
15 min - Load balancing: L4 vs L7
When one machine stops being enough — and the honest truth that vertical scaling goes much further than people admit before you need any of this. Then the two kinds of load balancer: L4 routes TCP connections and sees only IPs and ports (cheap, dumb, fast); L7 terminates HTTP and sees paths, headers, and cookies (smart, and it costs you TLS and a parse). The algorithms (round-robin, least-connections, consistent hashing) and where each actually matters, active vs passive health checks, the thundering re-route that turns one dead node into a dead cluster, and why sticky sessions are a smell everywhere except the one place they're unavoidable.
15 min - WebSockets & realtime under the hood
Every request you've sent so far, the client started. So how does a chat message the server just received reach your screen without you asking? First the ugly workarounds — short polling and long polling, and what each actually costs. Then the real WebSocket upgrade handshake (the actual Upgrade headers and the 101 response, including why Sec-WebSocket-Accept exists), frames and masking, and why silent proxies kill idle connections so you need ping/pong heartbeats. Then what Socket.IO adds on top — rooms, acks, auto-reconnect, the polling-to-websocket upgrade dance — and what that convenience costs. Finally the two hard problems realtime forces on you: catching up on messages you missed while offline, and fanning a message out across more than one server.
16 min - CDNs & the edge
You already ship files with a hash in the name — app.4f9c2a.js — and never think about why. This lesson is why. It starts from the one cost no code can beat: the speed of light, which makes an India-to-US round trip ~250ms no matter how fast your server is. A CDN answers by moving copies close to users: anycast puts the nearest edge on the same IP, and caching lets that edge answer without touching your origin at all. Then the machinery that decides what gets cached and for how long — cache keys, Cache-Control, ETag revalidation and the 304 — and the genuinely hard part, invalidation: why purging is slow and global and versioned URLs are instant (that hash in your filename). Finally what you cannot cache (per-user API JSON), edge compute as the middle ground, and signed URLs — serving private media fast without doing auth at the edge.
15 min