// BLOG · PAGE 8 OF 8

All posts

ALL POSTS · PAGE 8 / 8

NETWORKING

QUIC and HTTP/3: Rebuilding TCP in Userspace, on Purpose

HTTP/2 fixed application-layer head-of-line blocking and exposed the transport-layer version underneath. QUIC's answer: reimplement reliability per-stream over UDP, encrypt the transport headers, and make connections survive IP changes.

LINUX

fork() and Copy-on-Write: Duplicating a Process for Free

fork clones a 10 GB process in under a millisecond by copying nothing — just page tables, marked read-only. The first write to any page pays the real cost. Elegant, and the source of Redis's most famous operational trap.

DISTRIBUTED-SYSTEMS

Consistent Hashing: Surviving the Resize

hash(key) % N reshuffles nearly everything when N changes — a cache stampede with a math degree. Consistent hashing moves only 1/N of keys per node change, and virtual nodes fix the balance problem the elegant version hides.

FUNDAMENTALS

UTF-8: The Encoding That Won by Being Clever

UTF-8 was sketched on a placemat in 1992 and now carries ~98% of the web. It won because of five design properties — self-synchronization, ASCII compatibility, sort-order preservation — that no committee would have dared require.

SYSTEMS

Error Handling in C: In Defense of goto cleanup

C has no destructors, no defer, no exceptions — just early returns that leak and nested ifs that march off the screen. The kernel settled this decades ago: goto-based cleanup is the correct idiom, and it's more disciplined than its reputation.

NETWORKING

The TCP State Machine: Where Connections Actually Live

Eleven states, two of which cause most production incidents. Implementing TCP taught me the state diagram isn't trivia — TIME_WAIT port exhaustion, SYN backlogs, and orphaned FIN_WAIT_2 are all right there in the RFC 793 figure.

ALGORITHMS

Recursion Is Just a Stack You Didn't Write

Every recursive call is a frame pushed onto the call stack — return address, saved registers, locals. See the frame layout once and stack overflows, tail calls, and the recursion-to-iteration transformation all become mechanical.